]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
OpenGL 2.0 path: Make handling of Alpha-To-Coverage same as AlphaTest (enabling befor...
[xonotic/darkplaces.git] / vid_sdl.c
index f7f95bb4ecce1a247b375b73fe67cbca8da978c5..fdd70caaa2c386827c795f4d90ade552b1e771d2 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -2294,10 +2294,16 @@ qboolean VID_InitModeGL(viddef_mode_t *mode)
        vid_usinghidecursor = false;
 
        // enable multisampling
-       if (mode->samples > 1 && vid_multisampling.integer)
+       if (vid_multisampling.integer)
        {
                if (vid.support.arb_multisample)
+               {
                        qglEnable(GL_MULTISAMPLE_ARB);
+                       // it seems that enabling GL_MULTISAMPLE_ARB forces antialiasing to always work, fix the cvar as well
+                       // make sure vid_sample is at least 2 to make things correct
+                       if (vid_samples.integer < 2)
+                               Cvar_SetValueQuick(&vid_samples, 0);    
+               }
                else
                {
                        Cvar_SetValueQuick(&vid_multisampling, 0);