Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-20 13:35:58 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-20 13:35:58 +0300
commitbd28c25f9b9006608a86ee9f747c9bd433fa9ccc (patch)
treee20eaa72c6c16f5f61a5742a2d5f2940acc70429 /intern
parent5f25b91b65b25559fe46a447efea6728f88235b0 (diff)
Fix broken GLEW initialization. Initialize GLEW twice, once to get GLX
extensions, once to get final context extensions. Not so nice because we get a warning on startup from GLEW, but at least it GL extensions should work now.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index 487e4939f5d..0b4d41b61fe 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -102,7 +102,8 @@ GHOST_ContextGLX::~GHOST_ContextGLX()
}
#ifdef WITH_GLEW_MX
- delete m_glxewContext;
+ if (m_glxewContext)
+ delete m_glxewContext;
#endif
}
}
@@ -135,7 +136,8 @@ void GHOST_ContextGLX::initContextGLXEW()
glxewContext = new GLXEWContext;
memset(glxewContext, 0, sizeof(GLXEWContext));
- delete m_glxewContext;
+ if (m_glxewContext)
+ delete m_glxewContext;
m_glxewContext = glxewContext;
#endif
@@ -262,6 +264,9 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
initClearGL();
::glXSwapBuffers(m_display, m_window);
+ /* re initialize to get the extensions properly */
+ initContextGLXEW();
+
success = GHOST_kSuccess;
}
else {