]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_agl.c
added a -I option on Mac OSX SDL builds to include the relevant Headers
[xonotic/darkplaces.git] / vid_agl.c
index 2cf7194bc1edc202d9a5b6677575774c0713d497..984219b1e08973ae2d29a43a3ebf78242bbb7a7c 100644 (file)
--- a/vid_agl.c
+++ b/vid_agl.c
@@ -502,17 +502,17 @@ static void VID_ProcessPendingAsyncEvents (void)
 static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscreen, qboolean stereobuffer, int samples)
 {
        *attrib++ = AGL_RGBA;
-       *attrib++ = AGL_RED_SIZE;*attrib++ = 1;
-       *attrib++ = AGL_GREEN_SIZE;*attrib++ = 1;
-       *attrib++ = AGL_BLUE_SIZE;*attrib++ = 1;
+       *attrib++ = AGL_RED_SIZE;*attrib++ = stencil ? 8 : 5;
+       *attrib++ = AGL_GREEN_SIZE;*attrib++ = stencil ? 8 : 5;
+       *attrib++ = AGL_BLUE_SIZE;*attrib++ = stencil ? 8 : 5;
        *attrib++ = AGL_DOUBLEBUFFER;
-       *attrib++ = AGL_DEPTH_SIZE;*attrib++ = 1;
+       *attrib++ = AGL_DEPTH_SIZE;*attrib++ = stencil ? 24 : 16;
 
        // if stencil is enabled, ask for alpha too
        if (stencil)
        {
                *attrib++ = AGL_STENCIL_SIZE;*attrib++ = 8;
-               *attrib++ = AGL_ALPHA_SIZE;*attrib++ = 1;
+               *attrib++ = AGL_ALPHA_SIZE;*attrib++ = 8;
        }
        if (fullscreen)
                *attrib++ = AGL_FULLSCREEN;
@@ -707,9 +707,15 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate
        gl_vendor = (const char *)qglGetString(GL_VENDOR);
        gl_version = (const char *)qglGetString(GL_VERSION);
        gl_extensions = (const char *)qglGetString(GL_EXTENSIONS);
+       gl_platformextensions = "";
        gl_platform = "AGL";
        gl_videosyncavailable = true;
 
+       if (!gl_extensions)
+               gl_extensions = "";
+       if (!gl_platformextensions)
+               gl_platformextensions = "";
+
        Con_DPrintf("GL_VENDOR: %s\n", gl_vendor);
        Con_DPrintf("GL_RENDERER: %s\n", gl_renderer);
        Con_DPrintf("GL_VERSION: %s\n", gl_version);