From 2dcc5719e3b0da88eb260d6ae88c4de802efe210 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 16 May 2016 03:09:04 -0500 Subject: [PATCH] Explicitly set cull type for skybox Explicitly set cull type for skybox to front, instead of using whatever cull type the previous shader used (which could result in the skybox not being visible due to only drawing back faces). The sky cloud stages set the cull type so they are not affected by previous cull type. --- code/renderergl1/tr_sky.c | 1 + code/renderergl2/tr_sky.c | 1 + 2 files changed, 2 insertions(+) diff --git a/code/renderergl1/tr_sky.c b/code/renderergl1/tr_sky.c index daa5ff12..1d12e924 100644 --- a/code/renderergl1/tr_sky.c +++ b/code/renderergl1/tr_sky.c @@ -769,6 +769,7 @@ void RB_StageIteratorSky( void ) { qglPushMatrix (); GL_State( 0 ); + GL_Cull( CT_FRONT_SIDED ); qglTranslatef (backEnd.viewParms.or.origin[0], backEnd.viewParms.or.origin[1], backEnd.viewParms.or.origin[2]); DrawSkyBox( tess.shader ); diff --git a/code/renderergl2/tr_sky.c b/code/renderergl2/tr_sky.c index 840d0149..cc6b9cd8 100644 --- a/code/renderergl2/tr_sky.c +++ b/code/renderergl2/tr_sky.c @@ -871,6 +871,7 @@ void RB_StageIteratorSky( void ) { mat4_t oldmodelview; GL_State( 0 ); + GL_Cull( CT_FRONT_SIDED ); //qglTranslatef (backEnd.viewParms.or.origin[0], backEnd.viewParms.or.origin[1], backEnd.viewParms.or.origin[2]); {