From André Garneau, Win32 build fixes
This commit is contained in:
parent
3fe4be6e70
commit
ed01ae9387
@ -98,7 +98,7 @@ class GraphicsWindowWin32 : public osgViewer::GraphicsWindow
|
||||
|
||||
int getScreenNumberContainingWindow( int& _screenOriginX, int& _screenOriginY );
|
||||
|
||||
HGLRC& getWGLContext() { return _hglrc; }
|
||||
HGLRC getWGLContext() { return _hglrc; }
|
||||
|
||||
HWND _hwnd;
|
||||
HDC _hdc;
|
||||
|
@ -1411,13 +1411,17 @@ bool GraphicsWindowWin32::realizeImplementation()
|
||||
init();
|
||||
if (!_initialized) return false;
|
||||
|
||||
if (_traits.valid && _traits->sharedContext)
|
||||
if (_traits.valid() && _traits->sharedContext)
|
||||
{
|
||||
GraphicsWindowWin32* sharedContextWin32 = dynamic_cast<GraphicsWindowWin32*>(_traits->sharedContext);
|
||||
if (sharedContextWin32)
|
||||
{
|
||||
makeCurrent();
|
||||
wglShareLists( sharedContextWin32->getWGLContext(), getWGLContext() );
|
||||
if (!makeCurrent()) return false;
|
||||
if (!wglShareLists(sharedContextWin32->getWGLContext(), getWGLContext()))
|
||||
{
|
||||
reportErrorForScreen("GraphicsWindowWin32::realizeImplementation() - Unable to share OpenGL context", _traits->screenNum, ::GetLastError());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user