]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
default gl_mesh_floatcolors on, and force it off on 3Dfx drivers (sure this is unnece...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Aug 2002 20:39:43 +0000 (20:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Aug 2002 20:39:43 +0000 (20:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2176 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index 05e27471e49b04bdfb67e61f662dd8b5f23baa53..3fb433e9b1b79496178bb7669d8e3bc46b35a190 100644 (file)
@@ -4,7 +4,7 @@
 cvar_t gl_mesh_maxtriangles = {0, "gl_mesh_maxtriangles", "1024"};
 cvar_t gl_mesh_batchtriangles = {0, "gl_mesh_batchtriangles", "0"};
 cvar_t gl_mesh_transtriangles = {0, "gl_mesh_transtriangles", "16384"};
-cvar_t gl_mesh_floatcolors = {0, "gl_mesh_floatcolors", "0"};
+cvar_t gl_mesh_floatcolors = {0, "gl_mesh_floatcolors", "1"};
 cvar_t gl_mesh_drawmode = {CVAR_SAVE, "gl_mesh_drawmode", "3"};
 
 cvar_t r_render = {0, "r_render", "1"};
@@ -173,9 +173,14 @@ static void gl_backend_start(void)
        qglGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &gl_maxdrawrangeelementsvertices);
        qglGetIntegerv(GL_MAX_ELEMENTS_INDICES, &gl_maxdrawrangeelementsindices);
 
-       Con_Printf("OpenGL Backend started with gl_mesh_maxtriangles %i, gl_mesh_transtriangles %i", gl_mesh_maxtriangles.integer, gl_mesh_transtriangles.integer);
+       Con_Printf("OpenGL Backend started with gl_mesh_maxtriangles %i, gl_mesh_transtriangles %i\n", gl_mesh_maxtriangles.integer, gl_mesh_transtriangles.integer);
        if (qglDrawRangeElements != NULL)
-               Con_Printf(", with glDrawRangeElements (max vertices %i, max indices %i)\n", gl_maxdrawrangeelementsvertices, gl_maxdrawrangeelementsindices);
+               Con_Printf("glDrawRangeElements detected (max vertices %i, max indices %i)\n", gl_maxdrawrangeelementsvertices, gl_maxdrawrangeelementsindices);
+       if (strstr(gl_renderer, "3Dfx"))
+       {
+               Con_Printf("3Dfx driver detected, forcing gl_mesh_floatcolors to 0 to prevent crashs\n");
+               Cvar_SetValueQuick(&gl_mesh_floatcolors, 0);
+       }
        Con_Printf("\n");
 
        max_verts = max_meshs * 3;