From 957f0f8347e5e3421cdbe8bb6d9b47e6e3b260bd Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Fri, 17 Nov 2000 11:24:21 +0000 Subject: [PATCH] combined glClear calls, may be a speedup git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@81 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rsurf.c | 5 ----- gl_screen.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/gl_rsurf.c b/gl_rsurf.c index 3d0b4c2d..29c3d4d1 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -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); } diff --git a/gl_screen.c b/gl_screen.c index e2a35ffa..a5e7d733 100644 --- a/gl_screen.c +++ b/gl_screen.c @@ -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 -- 2.39.2