]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
changed behavior of gl_workaround_mac_texmatrix, reverting to previous
[xonotic/darkplaces.git] / vid_wgl.c
index 74308040dbebd717b545107fc5e2fbd59367fb95..3884cb07a21359c02ef556cc8ba3e679b4d4aa7c 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -1095,8 +1095,12 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat
 
        pixelformat = 0;
        newpixelformat = 0;
-       for (windowpass = 0;windowpass < 2;windowpass++)
+       // start out at the final windowpass if samples is 1 as it's the only feature we need extended pixel formats for
+       for (windowpass = samples == 1;windowpass < 2;windowpass++)
        {
+               gl_extensions = "";
+               gl_platformextensions = "";
+
                mainwindow = CreateWindowEx (ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
                if (!mainwindow)
                {
@@ -1164,6 +1168,11 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat
                if (qwglGetExtensionsStringARB)
                        gl_platformextensions = (const char *)qwglGetExtensionsStringARB(baseDC);
 
+               if (!gl_extensions)
+                       gl_extensions = "";
+               if (!gl_platformextensions)
+                       gl_platformextensions = "";
+
                // now some nice Windows pain:
                // we have created a window, we needed one to find out if there are
                // any multisample pixel formats available, the problem is that to