summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-05-05 16:46:59 +0200
committerJan Holesovsky <kendy@collabora.com>2014-05-05 16:47:23 +0200
commitfc4000a9be34304790219f08adfa924801f736e1 (patch)
tree33e7bf8dc54f33d9d19899cd71877099bfc04508 /vcl
parent0635a9c1906e00c16fd7c5b83720858b73edbae0 (diff)
openGL: More debug info.
Change-Id: Ia2e09c92673b97fd48c4ede7ebb9ff47da821926
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx12
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