X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fwgl%2Fglcontext.cpp;h=b6b2c5f91a68dc1d9260aec31ef3dc38d7c1beb2;hb=2deed84c84e513ee1c2a2fbbcd3946c1d772fcbb;hp=964dea2b7fba92a66815b7d84e89254c0c840880;hpb=8926837f7e81d0007d8cb94db701c4845a0a01a3;p=libs%2Fgui.git diff --git a/source/graphics/wgl/glcontext.cpp b/source/graphics/wgl/glcontext.cpp index 964dea2..b6b2c5f 100644 --- a/source/graphics/wgl/glcontext.cpp +++ b/source/graphics/wgl/glcontext.cpp @@ -16,8 +16,6 @@ struct GLContext::Private 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(const GLOptions &opts) throw unsupported_gl_mode(opts); SetPixelFormat(dc, pf_index, &pfd); + priv = new Private; priv->context = wglCreateContext(dc); wglMakeCurrent(dc, priv->context); @@ -62,9 +61,7 @@ void GLContext::swap_buffers() } void GLContext::window_resized(unsigned w, unsigned h) -{ - glViewport(0, 0, w, h); -} +{ } } // namespace Graphics } // namespace Msp