]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
Options menu has a width of 320, not 640
[xonotic/darkplaces.git] / gl_backend.c
index 7769bbc430db1d198a9fa1b06ac282406c2cd3de..56518855485b052fbd0b88d64e2ae7911ae77624 100644 (file)
@@ -72,9 +72,6 @@ int c_meshs, c_meshelements;
 
 void SCR_ScreenShot_f (void);
 
-// these are externally accessible
-int r_lightmapscalebit;
-
 static matrix4x4_t backend_viewmatrix;
 static matrix4x4_t backend_modelmatrix;
 static matrix4x4_t backend_modelviewmatrix;
@@ -617,7 +614,7 @@ void GL_ScissorTest(int state)
 {
        if(gl_state.scissortest == state)
                return;
-       
+
        CHECKGLERROR
        if((gl_state.scissortest = state))
                qglEnable(GL_SCISSOR_TEST);
@@ -1003,6 +1000,19 @@ void R_Mesh_State_Texture(const rmeshstate_t *m)
        }
 }
 
+void R_Mesh_Draw_ShowTris(int numverts, int numtriangles, int *elements)
+{
+       qglBegin(GL_LINES);
+       for (;numtriangles;numtriangles--, elements += 3)
+       {
+               qglArrayElement(elements[0]);qglArrayElement(elements[1]);
+               qglArrayElement(elements[1]);qglArrayElement(elements[2]);
+               qglArrayElement(elements[2]);qglArrayElement(elements[0]);
+       }
+       qglEnd();
+       CHECKGLERROR
+}
+
 /*
 ==============================================================================
 
@@ -1087,11 +1097,6 @@ void SCR_UpdateScreen (void)
        if (gl_combine.integer && (!gl_combine_extension || r_textureunits.integer < 2))
                Cvar_SetValueQuick(&gl_combine, 0);
 
-       // lightmaps only
-       r_lightmapscalebit = 0;
-       if (gl_combine.integer && r_textureunits.integer > 1)
-               r_lightmapscalebit += 2;
-
        R_TimeReport("setup");
 
        R_ClearScreen();