summaryrefslogtreecommitdiff
path: root/vcl/opengl/win/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/win/gdiimpl.cxx')
-rw-r--r--vcl/opengl/win/gdiimpl.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 6896a024ec7d..30088a9deb88 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -29,21 +29,21 @@ void WinOpenGLSalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalGraphics*
OpenGLSalGraphicsImpl::DoCopyBits( rPosAry, *pImpl );
}
-OpenGLContext* WinOpenGLSalGraphicsImpl::CreateWinContext()
+rtl::Reference<OpenGLContext> WinOpenGLSalGraphicsImpl::CreateWinContext()
{
- OpenGLContext* pContext = new OpenGLContext();
+ rtl::Reference<OpenGLContext> pContext = OpenGLContext::Create();
pContext->requestSingleBufferedRendering();
pContext->init( mrParent.mhLocalDC, mrParent.mhWnd );
return pContext;
}
-bool WinOpenGLSalGraphicsImpl::UseContext( OpenGLContext* pContext )
+bool WinOpenGLSalGraphicsImpl::UseContext( const rtl::Reference<OpenGLContext> &pContext )
{
- if( !pContext || !pContext->isInitialized() )
+ if( !pContext.is() || !pContext->isInitialized() )
return false;
if( IsOffscreen() )
return true;
- return ( pContext->getOpenGLWindow().hWnd == mrParent.mhWnd );
+ return pContext->getOpenGLWindow().hWnd == mrParent.mhWnd;
}
namespace