From feeab1ad53f1b7cd4496fb8e7f173f21e460aac0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 18 Apr 2013 16:28:39 +0000 Subject: 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. --- source/blender/gpu/intern/gpu_extensions.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/gpu/intern/gpu_extensions.c') 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); } -- cgit v1.2.3