summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2012-10-26 07:40:57 +0000
committerTim Angus <tim@ngus.net>2013-01-12 21:20:54 +0000
commit7d1b765828d21a98b5c3f663b9ef110e728153bd (patch)
tree17cd7b8c6a9ec7877ba541e1db145cbd7660dfd4
parent8b3fbb7ae83a5126b5401485a1151765abf3f9cb (diff)
Merge changes to GL_Cull from Rend2 into opengl1 renderer, behavior is the same.
-rw-r--r--src/renderer/tr_backend.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/renderer/tr_backend.c b/src/renderer/tr_backend.c
index acf82bd0..6b34a813 100644
--- a/src/renderer/tr_backend.c
+++ b/src/renderer/tr_backend.c
@@ -135,30 +135,16 @@ void GL_Cull( int cullType ) {
}
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 );
- }
- }
- else
- {
- if ( backEnd.viewParms.isMirror )
- {
- qglCullFace( GL_BACK );
- }
- else
- {
- qglCullFace( GL_FRONT );
- }
+ cullFront = !cullFront;
}
+
+ qglCullFace( cullFront ? GL_FRONT : GL_BACK );
}
}