Kaydet (Commit) 1c20a126 authored tarafından Michael Meeks's avatar Michael Meeks

vcl: only use default windows' GL Context for bitmaps if NULL / uninitialized.

Change-Id: I6465c548ba5d50da2cca7cce24e9bd2a20b28f47
üst 95017eaf
...@@ -464,6 +464,8 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const ...@@ -464,6 +464,8 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const
bool OpenGLSalBitmap::makeCurrent() bool OpenGLSalBitmap::makeCurrent()
{ {
if (!mpContext || !mpContext->isInitialized())
{
OpenGLContextProvider *pProvider; OpenGLContextProvider *pProvider;
pProvider = dynamic_cast< OpenGLContextProvider* >( ImplGetDefaultWindow()->GetGraphics() ); pProvider = dynamic_cast< OpenGLContextProvider* >( ImplGetDefaultWindow()->GetGraphics() );
if( pProvider == NULL ) if( pProvider == NULL )
...@@ -472,6 +474,7 @@ bool OpenGLSalBitmap::makeCurrent() ...@@ -472,6 +474,7 @@ bool OpenGLSalBitmap::makeCurrent()
return false; return false;
} }
mpContext = pProvider->GetOpenGLContext(); mpContext = pProvider->GetOpenGLContext();
}
mpContext->makeCurrent(); mpContext->makeCurrent();
return true; return true;
} }
......
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