mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-17 06:05:28 -06:00
GLCtrl: Fixed to compile
git-svn-id: svn://ultimatepp.org/upp/trunk@13877 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ac97efd983
commit
09e53ee281
1 changed files with 2 additions and 23 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue