Don't create images/framebuffers that won't be used, and add checks before use.
This commit is contained in:
1 parent
d4fc617cec
commit
eea652f5c5
6 files changed
+69
-48
No files matched your search
@@ -1241,7 +1241,7 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input )
|
||||
int i;
|
||||
vec4_t enableTextures;
|
||||
|
||||
if ((backEnd.viewParms.flags & VPF_USESUNLIGHT) && (pStage->glslShaderIndex & LIGHTDEF_LIGHTTYPE_MASK))
|
||||
if (r_sunlightMode->integer && (backEnd.viewParms.flags & VPF_USESUNLIGHT) && (pStage->glslShaderIndex & LIGHTDEF_LIGHTTYPE_MASK))
|
||||
{
|
||||
GL_BindToTMU(tr.screenShadowImage, TB_SHADOWMAP);
|
||||
GLSL_SetUniformVec3(sp, UNIFORM_PRIMARYLIGHTAMBIENT, backEnd.refdef.sunAmbCol);
|
||||
@@ -1552,8 +1552,8 @@ void RB_StageIteratorGeneric( void )
|
||||
//
|
||||
// pshadows!
|
||||
//
|
||||
if (glRefConfig.framebufferObject && tess.pshadowBits && tess.shader->sort <= SS_OPAQUE
|
||||
&& !(tess.shader->surfaceFlags & (SURF_NODLIGHT | SURF_SKY) ) ) {
|
||||
if (glRefConfig.framebufferObject && r_shadows->integer == 4 && tess.pshadowBits
|
||||
&& tess.shader->sort <= SS_OPAQUE && !(tess.shader->surfaceFlags & (SURF_NODLIGHT | SURF_SKY) ) ) {
|
||||
ProjectPshadowVBOGLSL();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user