From 7d1b765828d21a98b5c3f663b9ef110e728153bd Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 26 Oct 2012 07:40:57 +0000 Subject: Merge changes to GL_Cull from Rend2 into opengl1 renderer, behavior is the same. --- src/renderer/tr_backend.c | 26 ++++++-------------------- 1 file 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 ); } } -- cgit