summaryrefslogtreecommitdiff
path: root/src/renderer/tr_shade.c
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-07-29 12:27:00 +0000
committerTim Angus <tim@ngus.net>2013-01-10 22:36:34 +0000
commite7c06719510940898e1f7f8215f4137202611308 (patch)
tree0aec0bf91daa568d8cb4a1c412037ca26b2f92a6 /src/renderer/tr_shade.c
parent76544bcec46127587d183a90e5ff817a71e1f139 (diff)
Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings
Diffstat (limited to 'src/renderer/tr_shade.c')
-rw-r--r--src/renderer/tr_shade.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/renderer/tr_shade.c b/src/renderer/tr_shade.c
index f12519b4..c71a8d34 100644
--- a/src/renderer/tr_shade.c
+++ b/src/renderer/tr_shade.c
@@ -1175,8 +1175,10 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input )
void RB_StageIteratorGeneric( void )
{
shaderCommands_t *input;
+ shader_t *shader;
input = &tess;
+ shader = input->shader;
RB_DeformTessGeometry();
@@ -1193,10 +1195,10 @@ void RB_StageIteratorGeneric( void )
//
// set face culling appropriately
//
- GL_Cull( input->shader->cullType );
+ GL_Cull( shader->cullType );
// set polygon offset if necessary
- if ( input->shader->polygonOffset )
+ if ( shader->polygonOffset )
{
qglEnable( GL_POLYGON_OFFSET_FILL );
qglPolygonOffset( r_offsetFactor->value, r_offsetUnits->value );
@@ -1208,7 +1210,7 @@ void RB_StageIteratorGeneric( void )
// to avoid compiling those arrays since they will change
// during multipass rendering
//
- if ( tess.numPasses > 1 || input->shader->multitextureEnv )
+ if ( tess.numPasses > 1 || shader->multitextureEnv )
{
setArraysOnce = qfalse;
qglDisableClientState (GL_COLOR_ARRAY);
@@ -1276,7 +1278,7 @@ void RB_StageIteratorGeneric( void )
//
// reset polygon offset
//
- if ( input->shader->polygonOffset )
+ if ( shader->polygonOffset )
{
qglDisable( GL_POLYGON_OFFSET_FILL );
}
@@ -1292,7 +1294,6 @@ void RB_StageIteratorVertexLitTexture( void )
shader_t *shader;
input = &tess;
-
shader = input->shader;
//
@@ -1313,7 +1314,7 @@ void RB_StageIteratorVertexLitTexture( void )
//
// set face culling appropriately
//
- GL_Cull( input->shader->cullType );
+ GL_Cull( shader->cullType );
//
// set arrays and lock
@@ -1366,8 +1367,10 @@ void RB_StageIteratorVertexLitTexture( void )
void RB_StageIteratorLightmappedMultitexture( void ) {
shaderCommands_t *input;
+ shader_t *shader;
input = &tess;
+ shader = input->shader;
//
// log this call
@@ -1381,7 +1384,7 @@ void RB_StageIteratorLightmappedMultitexture( void ) {
//
// set face culling appropriately
//
- GL_Cull( input->shader->cullType );
+ GL_Cull( shader->cullType );
//
// set color, pointers, and lock