diff --git a/uppsrc/GLCtrl/GtkGLCtrl.cpp b/uppsrc/GLCtrl/GtkGLCtrl.cpp index e52dd51b4..f99659a0c 100644 --- a/uppsrc/GLCtrl/GtkGLCtrl.cpp +++ b/uppsrc/GLCtrl/GtkGLCtrl.cpp @@ -43,10 +43,10 @@ void GLCtrl::Create() if(!gdk) return; - Window w = gdk_x11_drawable_get_xid((GdkDrawable *)gdk); + Window w = gdk_x11_window_get_xid(gdk); ONCELOCK { - s_Display = gdk_x11_drawable_get_xdisplay((GdkDrawable *)gdk); + s_Display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); int samples = numberOfSamples; do { @@ -62,27 +62,6 @@ void GLCtrl::Create() s_XVisualInfo = glXChooseVisual(s_Display, DefaultScreen(s_Display), attr); } while(!s_XVisualInfo && samples > 0); - -/* - GLXFBConfig *fbc; - do { - Vector attr; - attr << GLX_RGBA << GLX_DEPTH_SIZE << depthSize - << GLX_STENCIL_SIZE << stencilSize; - if(doubleBuffering) - attr << GLX_DOUBLEBUFFER; - if(samples > 1) - attr << GLX_SAMPLE_BUFFERS_ARB << 1 << GLX_SAMPLES_ARB << samples; - attr << 0; - samples >>= 1; - int fbcount; - fbc = glXChooseFBConfig(s_Display, DefaultScreen(s_Display), attr, &fbcount); - } - while(!fbc && samples > 0); - - if(fbc) - s_XVisualInfo = glXGetVisualFromFBConfig(s_Display, fbc[0]); -*/ if(!s_XVisualInfo) return; s_Colormap = XCreateColormap(s_Display, RootWindow(s_Display, s_XVisualInfo->screen), s_XVisualInfo->visual, AllocNone);