diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-11-02 04:12:59 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-11-10 07:58:47 +0100 |
commit | 73ca9a6b71b484e6dc331c6ffbca6071a1bf1195 (patch) | |
tree | dd65f1aff31662e535c814f7d556bd55894b8424 /vcl/source/opengl | |
parent | dafa1c73e65bf363d97d86a91d5d4da1068ad6c9 (diff) |
init the OpenGL context in the windows backend
Change-Id: Ic4fb491c95170639015a4452f355354ad01612bc
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index b4c2cee2a2cc..fe97372ec5b6 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -513,6 +513,16 @@ bool OpenGLContext::init(Display* dpy, Window win, int screen) return ImplInit(); } +#elif defined( _WIN32 ) +bool OpenGLContext::init(HDC hDC, HWND hWnd) +{ + if (mbInitialized) + return false; + + m_aGLWin.hDC = hDC; + m_aGLWin.hWnd = hWnd; + return ImplInit(); +} #endif bool OpenGLContext::ImplInit() @@ -524,7 +534,6 @@ bool OpenGLContext::ImplInit() m_aGLWin.Height = 0; #if defined( WNT ) - m_aGLWin.hDC = GetDC(m_aGLWin.hWnd); #elif defined( MACOSX ) #elif defined( IOS ) @@ -778,6 +787,7 @@ bool OpenGLContext::initWindow() m_aGLWin.hWnd = sysData->hWnd; } + m_aGLWin.hDC = GetDC(m_aGLWin.hWnd); return true; } |