]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
stencil is now supported (optional, off by default, use vid_stencil to enable)
[xonotic/darkplaces.git] / vid_wgl.c
index d93961282c6fe749d44755d8504b64fdafd5a723..d2c0184041aa2cf2afb9c28bf35ea6d0011020c8 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -671,7 +671,7 @@ void VID_Init(void)
        Cmd_AddCommand ("joyadvancedupdate", Joy_AdvancedUpdate_f);
 }
 
-int VID_InitMode (int fullscreen, int width, int height, int bpp)
+int VID_InitMode (int fullscreen, int width, int height, int bpp, int stencil)
 {
        int i;
        HDC hdc;
@@ -703,10 +703,15 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp)
        HGLRC baseRC;
        int CenterX, CenterY;
        const char *gldrivername;
-
+       
        if (vid_initialized)
                Sys_Error("VID_InitMode called when video is already initialised\n");
 
+       if (stencil)
+               pfd.cStencilBits = 8;
+       else
+               pfd.cStencilBits = 0;
+
        gldrivername = "opengl32.dll";
        i = COM_CheckParm("-gl_driver");
        if (i && i < com_argc - 1)