]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_glx.c
fix bug in wav loader that messed up loopstart, now looping sounds in
[xonotic/darkplaces.git] / vid_glx.c
index d51318a6377f2621331cf9ecab38888424c167b8..426e4cfc4da579bc47cbed6abcef7bdbf273c95a 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -616,20 +616,20 @@ void VID_Init(void)
 void VID_BuildGLXAttrib(int *attrib, qboolean stencil, qboolean stereobuffer, int samples)
 {
        *attrib++ = GLX_RGBA;
-       *attrib++ = GLX_RED_SIZE;*attrib++ = 1;
-       *attrib++ = GLX_GREEN_SIZE;*attrib++ = 1;
-       *attrib++ = GLX_BLUE_SIZE;*attrib++ = 1;
+       *attrib++ = GLX_RED_SIZE;*attrib++ = stencil ? 8 : 5;
+       *attrib++ = GLX_GREEN_SIZE;*attrib++ = stencil ? 8 : 5;
+       *attrib++ = GLX_BLUE_SIZE;*attrib++ = stencil ? 8 : 5;
        *attrib++ = GLX_DOUBLEBUFFER;
-       *attrib++ = GLX_DEPTH_SIZE;*attrib++ = 1;
+       *attrib++ = GLX_DEPTH_SIZE;*attrib++ = stencil ? 24 : 16;
        // if stencil is enabled, ask for alpha too
        if (stencil)
        {
                *attrib++ = GLX_STENCIL_SIZE;*attrib++ = 8;
-               *attrib++ = GLX_ALPHA_SIZE;*attrib++ = 1;
+               *attrib++ = GLX_ALPHA_SIZE;*attrib++ = 8;
        }
        if (stereobuffer)
                *attrib++ = GLX_STEREO;
-       if (samples)
+       if (samples > 1)
        {
                *attrib++ = GLX_SAMPLE_BUFFERS_ARB;
                *attrib++ = 1;