Skip to content

Commit

Permalink
Reset color to white before rendering decals rather than after having…
Browse files Browse the repository at this point in the history
… changed it.

Fixes #2487.
  • Loading branch information
Safety0ff committed Feb 13, 2011
1 parent e862a99 commit 84740c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/display3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3374,7 +3374,6 @@ static void drawDroidSelections( void )
}
}

glColor3f( 1.f, 1.f, 1.f); // Reset colors
pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON);
}

Expand Down
4 changes: 4 additions & 0 deletions src/terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,8 +1335,12 @@ void drawTerrain(void)

// select the terrain texture page
pie_SetTexturePage(terrainPage); glError();

// use the alpha to blend
pie_SetRendMode(REND_ALPHA);
// don't blend decals with another color
glColor3f( 1.f, 1.f, 1.f);

// and the texture coordinates buffer
glEnableClientState(GL_TEXTURE_COORD_ARRAY); glError();
glEnableClientState(GL_VERTEX_ARRAY); glError();
Expand Down

0 comments on commit 84740c4

Please sign in to comment.