combined glClear calls, may be a speedup
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Nov 2000 11:24:21 +0000 (11:24 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Nov 2000 11:24:21 +0000 (11:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@81 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c
gl_screen.c

index 3d0b4c2d5fd086b5f081d648bf8ff40731a3a4ff..29c3d4d1ac887ee4b398707a78f699225f4e71b5 100644 (file)
@@ -1001,14 +1001,9 @@ void R_DrawWorld (void)
        if (cl.worldmodel)
                R_WorldNode ();
 
-       glClear (GL_DEPTH_BUFFER_BIT);
-
        R_PushDlights (); // now mark the lit surfaces
 
        DrawTextureChains ();
-
-       glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 }
 
 
index e2a35ffacace7d13ef0b2f5260fc7b8354e1f65c..a5e7d733b5caaf0337e5c6a7c7d66dcdc53280bb 100644 (file)
@@ -902,7 +902,7 @@ void SCR_UpdateScreen (void)
                SCR_CalcRefdef ();
 
        glClearColor(0,0,0,0);
-       glClear (GL_COLOR_BUFFER_BIT); // LordHavoc: clear the screen (around the view as well)
+       glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // LordHavoc: clear the screen (around the view as well)
 
 //
 // do 3D refresh drawing, and then update the screen