[quake3-commits] r2336 - trunk/code/renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Oct 26 03:40:58 EDT 2012


Author: ztm
Date: 2012-10-26 03:40:57 -0400 (Fri, 26 Oct 2012)
New Revision: 2336

Modified:
   trunk/code/renderer/tr_backend.c
Log:
Merge changes to GL_Cull from Rend2 into opengl1 renderer, behavior is the same.

Modified: trunk/code/renderer/tr_backend.c
===================================================================
--- trunk/code/renderer/tr_backend.c	2012-10-26 07:23:49 UTC (rev 2335)
+++ trunk/code/renderer/tr_backend.c	2012-10-26 07:40:57 UTC (rev 2336)
@@ -134,30 +134,16 @@
 	} 
 	else 
 	{
+		qboolean cullFront;
 		qglEnable( GL_CULL_FACE );
 
-		if ( cullType == CT_BACK_SIDED )
+		cullFront = (cullType == CT_FRONT_SIDED);
+		if ( backEnd.viewParms.isMirror )
 		{
-			if ( backEnd.viewParms.isMirror )
-			{
-				qglCullFace( GL_FRONT );
-			}
-			else
-			{
-				qglCullFace( GL_BACK );
-			}
+			cullFront = !cullFront;
 		}
-		else
-		{
-			if ( backEnd.viewParms.isMirror )
-			{
-				qglCullFace( GL_BACK );
-			}
-			else
-			{
-				qglCullFace( GL_FRONT );
-			}
-		}
+
+		qglCullFace( cullFront ? GL_FRONT : GL_BACK );
 	}
 }
 



More information about the quake3-commits mailing list