diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-18 20:28:39 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-18 20:28:39 +0400 |
commit | feeab1ad53f1b7cd4496fb8e7f173f21e460aac0 (patch) | |
tree | 3c9142be45eaf2b7d85b8de2b88cdf4e2243769f /source/blender/gpu | |
parent | fb2b3155f72d3bc6d2025d332cb843befea78d75 (diff) |
Fix #34997: when starting the game engine in one window and switching to a second
window, the game would stop drawing in the first and mess up the OpenGL state of
the second.
Also fixes glPushAttrib/glPopAttrib getting out of sync in some cases.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 5d645a5545b..7909213e793 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -900,8 +900,7 @@ void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex) void GPU_framebuffer_texture_bind(GPUFrameBuffer *UNUSED(fb), GPUTexture *tex, int w, int h) { /* push attributes */ - glPushAttrib(GL_ENABLE_BIT); - glPushAttrib(GL_VIEWPORT_BIT); + glPushAttrib(GL_ENABLE_BIT | GL_VIEWPORT_BIT); glDisable(GL_SCISSOR_TEST); /* bind framebuffer */ @@ -927,7 +926,6 @@ void GPU_framebuffer_texture_unbind(GPUFrameBuffer *UNUSED(fb), GPUTexture *UNUS /* restore attributes */ glPopAttrib(); - glPopAttrib(); glEnable(GL_SCISSOR_TEST); } |