Cleanup.
This commit is contained in:
parent
76d4deb58a
commit
a45d37355e
|
|
@ -404,21 +404,11 @@ typedef struct shader_s {
|
|||
int numUnfoggedPasses;
|
||||
shaderStage_t *stages[MAX_SHADER_STAGES];
|
||||
|
||||
void (*optimalStageIteratorFunc)( void );
|
||||
|
||||
float clampTime; // time this shader is clamped to
|
||||
float timeOffset; // current time offset for this shader
|
||||
|
||||
int numStates; // if non-zero this is a state shader
|
||||
struct shader_s *currentShader; // current state if this is a state shader
|
||||
struct shader_s *parentShader; // current state if this is a state shader
|
||||
int currentState; // current state index for cycle purposes
|
||||
long expireTime; // time in milliseconds this expires
|
||||
|
||||
struct shader_s *remappedShader; // current shader this one is remapped too
|
||||
|
||||
int shaderStates[MAX_STATES_PER_SHADER]; // index to valid shader states
|
||||
|
||||
struct shader_s *next;
|
||||
} shader_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ void RB_BeginSurface( shader_t *shader, int fogNum ) {
|
|||
tess.dlightBits = 0; // will be OR'd in by surface functions
|
||||
tess.xstages = state->stages;
|
||||
tess.numPasses = state->numUnfoggedPasses;
|
||||
tess.currentStageIteratorFunc = state->optimalStageIteratorFunc;
|
||||
|
||||
tess.currentStageIteratorFunc = state->isSky ? RB_StageIteratorSky : RB_StageIteratorGeneric;
|
||||
|
||||
tess.shaderTime = backEnd.refdef.floatTime - tess.shader->timeOffset;
|
||||
if (tess.shader->clampTime && tess.shaderTime >= tess.shader->clampTime) {
|
||||
|
|
|
|||
|
|
@ -2161,13 +2161,6 @@ static shader_t *FinishShader( void ) {
|
|||
shader.sort = SS_FOG;
|
||||
}
|
||||
|
||||
// determine which stage iterator function is appropriate
|
||||
if ( shader.isSky ) {
|
||||
shader.optimalStageIteratorFunc = RB_StageIteratorSky;
|
||||
} else {
|
||||
shader.optimalStageIteratorFunc = RB_StageIteratorGeneric;
|
||||
}
|
||||
|
||||
return GeneratePermanentShader();
|
||||
}
|
||||
|
||||
|
|
@ -2700,12 +2693,10 @@ void R_ShaderList_f (void) {
|
|||
ri.Printf( PRINT_ALL, " " );
|
||||
}
|
||||
|
||||
if ( shader->optimalStageIteratorFunc == RB_StageIteratorGeneric ) {
|
||||
if ( !shader->isSky ) {
|
||||
ri.Printf( PRINT_ALL, "gen " );
|
||||
} else if ( shader->optimalStageIteratorFunc == RB_StageIteratorSky ) {
|
||||
ri.Printf( PRINT_ALL, "sky " );
|
||||
} else {
|
||||
ri.Printf( PRINT_ALL, " " );
|
||||
ri.Printf( PRINT_ALL, "sky " );
|
||||
}
|
||||
|
||||
if ( shader->defaultShader ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user