diff options
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 1bd69c221be2..3311c082f714 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -317,7 +317,11 @@ void OpenGLHelper::createFramebuffer(long nWidth, long nHeight, GLuint& nFramebu // attach a renderbuffer to depth attachment point glBindRenderbuffer(GL_RENDERBUFFER, nRenderbufferDepthId); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, nRenderbufferDepthId); - glCheckFramebufferStatus(GL_FRAMEBUFFER); + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) + { + SAL_WARN("vcl.opengl", "invalid framebuffer status"); + } glBindRenderbuffer(GL_RENDERBUFFER, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0); } @@ -348,6 +352,8 @@ void OpenGLHelper::checkGLError(const char* pFile, size_t nLine) SAL_WARN("vcl.opengl", "GL Error #" << glErr << "(" << sError << ") in File " << pFile << " at line: " << nLine); else SAL_WARN("vcl.opengl", "GL Error #" << glErr << " (no message available) in File " << pFile << " at line: " << nLine); + + glErr = glGetError(); } } |