Added context sharing support.

This commit is contained in:
Robert Osfield
2007-02-15 12:24:04 +00:00
parent 4f2474ece8
commit 3fe4be6e70
6 changed files with 55 additions and 9 deletions

View File

@@ -422,13 +422,16 @@ void GraphicsWindowX11::init()
}
}
// need to pick up from traits
GLXContext sharedGLContext = 0;
GraphicsWindowX11* sharedContextX11 = dynamic_cast<GraphicsWindowX11*>(_traits->sharedContext);
if (sharedContextX11) sharedGLContext = sharedContextX11->getGLXContext();
_glxContext = glXCreateContext( _display, _visualInfo, sharedGLContext, True );
if (sharedContextX11)
{
_glxContext = glXCreateContext( _display, _visualInfo, sharedContextX11->getGLXContext(), True );
}
else
{
_glxContext = glXCreateContext( _display, _visualInfo, NULL, True );
}
if (!_glxContext)
{