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,14 +464,17 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const ...@@ -464,14 +464,17 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const
bool OpenGLSalBitmap::makeCurrent() bool OpenGLSalBitmap::makeCurrent()
{ {
OpenGLContextProvider *pProvider; if (!mpContext || !mpContext->isInitialized())
pProvider = dynamic_cast< OpenGLContextProvider* >( ImplGetDefaultWindow()->GetGraphics() );
if( pProvider == NULL )
{ {
SAL_WARN( "vcl.opengl", "Couldn't get default OpenGL context provider" ); OpenGLContextProvider *pProvider;
return false; pProvider = dynamic_cast< OpenGLContextProvider* >( ImplGetDefaultWindow()->GetGraphics() );
if( pProvider == NULL )
{
SAL_WARN( "vcl.opengl", "Couldn't get default OpenGL context provider" );
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