diff options
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 18530ae6f561..5271214fd5af 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -435,7 +435,12 @@ bool OpenGLContext::ImplInit() } SetPixelFormat(m_aGLWin.hDC,WindowPix,&PixelFormatFront); m_aGLWin.hRC = wglCreateContext(m_aGLWin.hDC); - wglMakeCurrent(m_aGLWin.hDC,m_aGLWin.hRC); + + if (!wglMakeCurrent(m_aGLWin.hDC,m_aGLWin.hRC)) + { + SAL_WARN("vcl.opengl", "Failed wglMakeCurrent: " << GetLastError()); + return false; + } #elif defined( MACOSX ) @@ -506,9 +511,10 @@ bool OpenGLContext::ImplInit() if(!bGlewInit) { glewExperimental = GL_TRUE; - if (glewInit() != GLEW_OK) + GLenum err = glewInit(); + if (err != GLEW_OK) { - SAL_WARN("vcl.opengl", "Failed to initialize GLEW"); + SAL_WARN("vcl.opengl", "Failed to initialize GLEW: " << glewGetErrorString(err)); return false; } else |