summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 970957cf1555..e836e821f82f 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -61,6 +61,11 @@ OpenGLContext* OpenGLSalGraphicsImpl::GetOpenGLContext()
return mpContext;
}
+OpenGLContext* OpenGLSalGraphicsImpl::GetDefaultContext()
+{
+ return ImplGetDefaultWindow()->GetGraphics()->GetOpenGLContext();
+}
+
bool OpenGLSalGraphicsImpl::AcquireContext( )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -81,7 +86,7 @@ bool OpenGLSalGraphicsImpl::AcquireContext( )
if( pContext )
pContext->AddRef();
else
- pContext = mbOffscreen ? CreatePixmapContext() : CreateWinContext();
+ pContext = mbOffscreen ? GetDefaultContext() : CreateWinContext();
mpContext = pContext;
return (mpContext != NULL);
@@ -112,15 +117,6 @@ void OpenGLSalGraphicsImpl::Init()
maOffscreenTex.GetHeight() != GetHeight() )
{
maOffscreenTex = OpenGLTexture();
-#if defined(WNT)
- // URGH ... VirtualDevice may have destroyed the underlying resource
- // our context is associated with - FIXME: can we do better here ?
- if (mpContext)
- {
- mpContext->resetToReInitialize();
- ReleaseContext();
- }
-#endif
}
}