]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
turn off r_glsl if compilation of the lowest level fallback fails
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 30 Aug 2007 03:55:44 +0000 (03:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 30 Aug 2007 03:55:44 +0000 (03:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7547 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 9f3cef9b085e8a1ab6c209451c717dc4e6cf8e66..5ce992d643668ea89922fb5aa398d03abe76f9ba 100644 (file)
@@ -983,7 +983,11 @@ int R_SetupSurfaceShader(const vec3_t lightcolorbase, qboolean modellighting, fl
                        for (i = (SHADERPERMUTATION_MAX >> 1);;i>>=1)
                        {
                                if (!i)
+                               {
+                                       Con_Printf("OpenGL 2.0 shaders disabled - unable to find a working shader permutation fallback on this driver (set r_glsl 1 if you want to try again)\n");
+                                       Cvar_SetValueQuick(&r_glsl, 0);
                                        return 0; // no bit left to clear
+                               }
                                // reduce i more quickly whenever it would not remove any bits
                                if (!(permutation & i))
                                        continue;