Flip culling for mirrored models.

This commit is contained in:
Andrei Drexler 2011-03-09 02:43:38 +00:00
parent 2b57223b14
commit 47706299a5

View file

@ -147,6 +147,10 @@ void GL_BindToTMU( image_t *image, int tmu )
** GL_Cull ** GL_Cull
*/ */
void GL_Cull( int cullType ) { void GL_Cull( int cullType ) {
// Makro - flip culling if needed
qboolean flip = (backEnd.currentEntity != NULL && backEnd.currentEntity->mirrored != qfalse && cullType != CT_TWO_SIDED);
cullType ^= flip; // this assumes CT_BACK_SIDED and CT_FRONT_SIDED are 0 or 1
if ( glState.faceCulling == cullType ) { if ( glState.faceCulling == cullType ) {
return; return;
} }