mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 00:20:59 +00:00
Don't create images/framebuffers that won't be used, and add checks before use.
This commit is contained in:
parent
d4fc617cec
commit
eea652f5c5
6 changed files with 69 additions and 48 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue