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.
This commit is contained in:
@@ -102,6 +102,7 @@ GHOST_ContextGLX::~GHOST_ContextGLX()
|
||||
}
|
||||
|
||||
#ifdef WITH_GLEW_MX
|
||||
if (m_glxewContext)
|
||||
delete m_glxewContext;
|
||||
#endif
|
||||
}
|
||||
@@ -135,6 +136,7 @@ void GHOST_ContextGLX::initContextGLXEW()
|
||||
glxewContext = new GLXEWContext;
|
||||
memset(glxewContext, 0, sizeof(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 {
|
||||
|
Reference in New Issue
Block a user