From da11e337441f747155fa75c19263df70bfe6c543 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 17 Nov 2015 09:20:25 +0200 Subject: Check for OpenGL errors right where an error might be generated CHECK_GL_ERROR() is now zero-cost in a production build, so no reason to avoid it. Don't check for OpenGL errors after glX or wgl calls. They don't generate OpenGL errors but use the X and Win32 error mechanisms, as far as I see. Change-Id: I8f97ef434cbdc89d6e345a247456cfc4a1a82bb6 --- vcl/source/opengl/OpenGLContext.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl/source') diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 6670489efce1..0c58120b8d78 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -197,7 +197,6 @@ int InitTempWindow(HWND *hwnd, int width, int height, const PIXELFORMATDESCRIPTO return -1; } - CHECK_GL_ERROR(); return 0; } @@ -1612,6 +1611,7 @@ OpenGLFramebuffer* OpenGLContext::AcquireFramebuffer( const OpenGLTexture& rText BindFramebuffer( pFramebuffer ); pFramebuffer->AttachTexture( rTexture ); glViewport( 0, 0, rTexture.GetWidth(), rTexture.GetHeight() ); + CHECK_GL_ERROR(); return pFramebuffer; } -- cgit