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
632cf5b055
commit
6bc75ac953
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_RGBA,
|
||||||
GLX_DOUBLEBUFFER,
|
GLX_DOUBLEBUFFER,
|
||||||
//GLX_BUFFER_SIZE, 16,
|
|
||||||
GLX_DEPTH_SIZE, 16,
|
GLX_DEPTH_SIZE, 16,
|
||||||
GLX_RED_SIZE, 4,
|
GLX_RED_SIZE, 4,
|
||||||
GLX_GREEN_SIZE, 4,
|
GLX_GREEN_SIZE, 4,
|
||||||
GLX_BLUE_SIZE, 4,
|
GLX_BLUE_SIZE, 4,
|
||||||
|
GLX_ALPHA_SIZE, 4,
|
||||||
GLX_STENCIL_SIZE, 8,
|
GLX_STENCIL_SIZE, 8,
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
@ -1064,33 +1064,17 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
||||||
{
|
{
|
||||||
GLX_RGBA,
|
GLX_RGBA,
|
||||||
GLX_DOUBLEBUFFER,
|
GLX_DOUBLEBUFFER,
|
||||||
//GLX_BUFFER_SIZE, 16,
|
|
||||||
GLX_DEPTH_SIZE, 24,
|
GLX_DEPTH_SIZE, 24,
|
||||||
GLX_RED_SIZE, 8,
|
GLX_RED_SIZE, 8,
|
||||||
GLX_GREEN_SIZE, 8,
|
GLX_GREEN_SIZE, 8,
|
||||||
GLX_BLUE_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_ALPHA_SIZE, 8,
|
||||||
GLX_STENCIL_SIZE, 8,
|
GLX_STENCIL_SIZE, 8,
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
// first try 32bpp and if that fails 24bpp or 16bpp
|
// first try 24bpp and if that fails 16bpp
|
||||||
XVisualInfo *visual_info = glXChooseVisual (dpy, DefaultScreen(dpy), sAttribList32bpp);
|
XVisualInfo *visual_info = glXChooseVisual (dpy, DefaultScreen(dpy), sAttribList24bpp);
|
||||||
if (visual_info == NULL)
|
|
||||||
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList24bpp);
|
|
||||||
if (visual_info == NULL)
|
if (visual_info == NULL)
|
||||||
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList16bpp);
|
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList16bpp);
|
||||||
if(visual_info == NULL)
|
if(visual_info == NULL)
|
||||||
|
|
Loading…
Reference in a new issue