diff options
author | marha <marha@users.sourceforge.net> | 2015-04-20 22:42:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-04-20 22:42:55 +0200 |
commit | 934184bfecd402aae891b8740d788b486aa7269f (patch) | |
tree | c23fb0afd169dc6846ea23bda21260fcffd1e3e6 /mesalib/src/mesa/tnl/t_context.c | |
parent | 57dd848fb6dd7cf15820172e2abc9fb9de2b4268 (diff) | |
parent | 4ba9be2882d9f1567809edb0a31fcdf11320d41f (diff) | |
download | vcxsrv-934184bfecd402aae891b8740d788b486aa7269f.tar.gz vcxsrv-934184bfecd402aae891b8740d788b486aa7269f.tar.bz2 vcxsrv-934184bfecd402aae891b8740d788b486aa7269f.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/main/.gitignore
mesalib/src/mesa/main/dlopen.h
xorg-server/hw/xwin/glx/gen_gl_wrappers.py
xorg-server/hw/xwin/win.h
xorg-server/hw/xwin/winengine.c
xorg-server/hw/xwin/winglobals.c
xorg-server/hw/xwin/winscrinit.c
xorg-server/hw/xwin/winshaddd.c
xorg-server/randr/rrxinerama.c
Diffstat (limited to 'mesalib/src/mesa/tnl/t_context.c')
-rw-r--r-- | mesalib/src/mesa/tnl/t_context.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mesalib/src/mesa/tnl/t_context.c b/mesalib/src/mesa/tnl/t_context.c index bc705d7a3..5b9dd54d7 100644 --- a/mesalib/src/mesa/tnl/t_context.c +++ b/mesalib/src/mesa/tnl/t_context.c @@ -35,6 +35,7 @@ #include "math/m_translate.h" #include "math/m_xform.h" #include "main/state.h" +#include "main/viewport.h" #include "tnl.h" #include "t_context.h" @@ -69,6 +70,8 @@ _tnl_CreateContext( struct gl_context *ctx ) _tnl_install_pipeline( ctx, _tnl_default_pipeline ); } + _math_matrix_ctr(&tnl->_WindowMap); + tnl->NeedNdcCoords = GL_TRUE; tnl->AllowVertexFog = GL_TRUE; tnl->AllowPixelFog = GL_TRUE; @@ -108,6 +111,8 @@ _tnl_DestroyContext( struct gl_context *ctx ) struct tnl_shine_tab *s, *tmps; TNLcontext *tnl = TNL_CONTEXT(ctx); + _math_matrix_dtr(&tnl->_WindowMap); + /* Free lighting shininess exponentiation table */ foreach_s( s, tmps, tnl->_ShineTabList ) { free( s ); @@ -182,6 +187,13 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state ) } } } + + if (new_state & (_NEW_VIEWPORT | _NEW_BUFFERS)) { + double scale[3], translate[3]; + _mesa_get_viewport_xform(ctx, 0, scale, translate); + _math_matrix_viewport(&tnl->_WindowMap, scale, translate, + ctx->DrawBuffer->_DepthMaxF); + } } |