diff options
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 304d9f467dff..8dcaabb89276 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <GL/glew.h> #include <vcl/OpenGLContext.hxx> #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> @@ -447,6 +448,19 @@ bool OpenGLContext::init( Window* pParent ) #endif + static bool bGlewInit = false; + if(!bGlewInit) + { + glewExperimental = GL_TRUE; + if (glewInit() != GLEW_OK) + { + SAL_WARN("vcl.opengl", "Failed to initialize GLEW"); + return false; + } + else + bGlewInit = true; + } + SAL_INFO("vcl.opengl", "OpenGLContext::init----end"); mbInitialized = true; return true; |