GLCtrl: Fixed to compile

git-svn-id: svn://ultimatepp.org/upp/trunk@13877 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-01-13 14:02:15 +00:00
parent ac97efd983
commit 09e53ee281

View file

@ -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<int> 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);