mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: #898 Shadows under Linux
This commit is contained in:
parent
c71492c605
commit
293f47c367
1 changed files with 3 additions and 19 deletions
|
@ -1051,11 +1051,11 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
{
|
||||
GLX_RGBA,
|
||||
GLX_DOUBLEBUFFER,
|
||||
//GLX_BUFFER_SIZE, 16,
|
||||
GLX_DEPTH_SIZE, 16,
|
||||
GLX_RED_SIZE, 4,
|
||||
GLX_GREEN_SIZE, 4,
|
||||
GLX_BLUE_SIZE, 4,
|
||||
GLX_ALPHA_SIZE, 4,
|
||||
GLX_STENCIL_SIZE, 8,
|
||||
None
|
||||
};
|
||||
|
@ -1064,33 +1064,17 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
{
|
||||
GLX_RGBA,
|
||||
GLX_DOUBLEBUFFER,
|
||||
//GLX_BUFFER_SIZE, 16,
|
||||
GLX_DEPTH_SIZE, 24,
|
||||
GLX_RED_SIZE, 8,
|
||||
GLX_GREEN_SIZE, 8,
|
||||
GLX_BLUE_SIZE, 8,
|
||||
GLX_STENCIL_SIZE, 8,
|
||||
None
|
||||
};
|
||||
|
||||
static int sAttribList32bpp[] =
|
||||
{
|
||||
GLX_RGBA,
|
||||
GLX_DOUBLEBUFFER,
|
||||
//GLX_BUFFER_SIZE, 32,
|
||||
GLX_DEPTH_SIZE, 32,
|
||||
GLX_RED_SIZE, 8,
|
||||
GLX_GREEN_SIZE, 8,
|
||||
GLX_BLUE_SIZE, 8,
|
||||
GLX_ALPHA_SIZE, 8,
|
||||
GLX_STENCIL_SIZE, 8,
|
||||
None
|
||||
};
|
||||
|
||||
// first try 32bpp and if that fails 24bpp or 16bpp
|
||||
XVisualInfo *visual_info = glXChooseVisual (dpy, DefaultScreen(dpy), sAttribList32bpp);
|
||||
if (visual_info == NULL)
|
||||
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList24bpp);
|
||||
// first try 24bpp and if that fails 16bpp
|
||||
XVisualInfo *visual_info = glXChooseVisual (dpy, DefaultScreen(dpy), sAttribList24bpp);
|
||||
if (visual_info == NULL)
|
||||
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList16bpp);
|
||||
if(visual_info == NULL)
|
||||
|
|
Loading…
Reference in a new issue