Commit fee87449 authored by Ken Martin's avatar Ken Martin
Browse files

Try using pbuffer as drawable for checking openGL support

Need a drawable to make current use a pbuffer on glx
parent 1f4ff9d8
......@@ -1716,10 +1716,26 @@ int vtkXOpenGLRenderWindow::SupportsOpenGL()
return 0;
}
this->MakeCurrent();
int pbufferAttribs[] =
{
GLX_PBUFFER_WIDTH, 32,
GLX_PBUFFER_HEIGHT, 32,
None
};
GLXPbuffer pbuffer = glXCreatePbuffer(
this->DisplayId, this->Internal->FBConfig, pbufferAttribs);
XSync( this->DisplayId, False );
if ( !glXMakeContextCurrent( this->DisplayId, pbuffer, pbuffer, this->Internal->ContextId) )
{
return 0;
}
GLenum result = glewInit();
glFinish();
glXDestroyContext(this->DisplayId, this->Internal->ContextId);
glXDestroyPbuffer(this->DisplayId, pbuffer);
this->Internal->ContextId = 0;
bool m_valid = (result == GLEW_OK);
if (!m_valid)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment