Added support for sharing context to GraphicsWindowX11

This commit is contained in:
Robert Osfield
2007-02-14 20:14:45 +00:00
parent f82c34ff11
commit 87ff8e2b55
2 changed files with 15 additions and 2 deletions

View File

@@ -425,6 +425,9 @@ 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 (!_glxContext)
@@ -576,7 +579,6 @@ bool GraphicsWindowX11::makeCurrentImplementation()
return glXMakeCurrent( _display, _window, _glxContext )==True;
}
bool GraphicsWindowX11::releaseContextImplementation()
{
if (!_realized)