X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fwgl%2Fglcontext.cpp;h=05f9533de839322057b6b896eb8bc0cfabd3636d;hb=7cd7824857aa9b95a9df40e782bfc121854e1d9c;hp=1a0ad7adc011f48b9b12db3ced3c33d908395396;hpb=1aca77b93853ee127ac3bbf6886f7f04920542ef;p=libs%2Fgui.git diff --git a/source/graphics/wgl/glcontext.cpp b/source/graphics/wgl/glcontext.cpp index 1a0ad7a..05f9533 100644 --- a/source/graphics/wgl/glcontext.cpp +++ b/source/graphics/wgl/glcontext.cpp @@ -14,10 +14,8 @@ struct GLContext::Private }; -void GLContext::platform_init() +void GLContext::platform_init(const GLOptions &opts) { - priv = new Private; - HDC dc = GetDC(window.get_private().window); PIXELFORMATDESCRIPTOR pfd; @@ -40,6 +38,7 @@ void GLContext::platform_init() throw unsupported_gl_mode(opts); SetPixelFormat(dc, pf_index, &pfd); + priv = new Private; priv->context = wglCreateContext(dc); wglMakeCurrent(dc, priv->context);