X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fglx%2Fglcontext.cpp;h=b3d8ed0565d867e6f8ab06df0095232d81c73e04;hb=7cd7824857aa9b95a9df40e782bfc121854e1d9c;hp=a73b9c554760af4f1c5d368b69605533c48be16f;hpb=849fc4ee770924d57f8cdf06bd5224573989ccde;p=libs%2Fgui.git diff --git a/source/graphics/glx/glcontext.cpp b/source/graphics/glx/glcontext.cpp index a73b9c5..b3d8ed0 100644 --- a/source/graphics/glx/glcontext.cpp +++ b/source/graphics/glx/glcontext.cpp @@ -22,8 +22,6 @@ struct GLContext::Private void GLContext::platform_init(const GLOptions &opts) { - priv = new Private; - vector attribs; attribs.push_back(GLX_RGBA); @@ -60,6 +58,8 @@ void GLContext::platform_init(const GLOptions &opts) XVisualInfo *vi = glXChooseVisual(dpy, DefaultScreen(dpy), &attribs.front()); if(!vi) throw unsupported_gl_mode(opts); + + priv = new Private; priv->context = glXCreateContext(dpy, vi, 0, true); XSetWindowAttributes attr;