From 8c7fedb1feb5f3b046c6e640d8f4da1ad8ec7477 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Sun, 30 Nov 2014 21:50:33 -0800 Subject: [PATCH] OpenGL2: Fix face culling. --- code/renderergl2/tr_backend.c | 3 --- code/renderergl2/tr_init.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index 3b297b8d..e74f8f24 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -538,9 +538,6 @@ void RB_BeginDrawingView (void) { backEnd.isHyperspace = qfalse; } - glState.faceCulling = -1; // force face culling to set next time - glState.faceCullFront = -1; // same as above - // we will only draw a sun if there was sky rendered in this view backEnd.skyRenderedThisView = qfalse; diff --git a/code/renderergl2/tr_init.c b/code/renderergl2/tr_init.c index e79d735d..525dfba0 100644 --- a/code/renderergl2/tr_init.c +++ b/code/renderergl2/tr_init.c @@ -946,6 +946,8 @@ void GL_SetDefaultState( void ) // glState.glStateBits = GLS_DEPTHTEST_DISABLE | GLS_DEPTHMASK_TRUE; glState.storedGlState = 0; + glState.faceCulling = CT_TWO_SIDED; + glState.faceCullFront = qtrue; glState.currentProgram = 0; qglUseProgramObjectARB(0);