Do not disable lighting if it was never enabled in the first place, to avoid

doing unnecessary OpenGL state changes. Also make sure we turn off normalization.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2778 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2007-11-10 13:56:14 +00:00
parent 1dd2b54431
commit ff13be0b96
1 changed files with 5 additions and 1 deletions

View File

@ -225,7 +225,11 @@ static inline void pie_Polygon(const SDWORD numVerts, const TERRAIN_VERTEXF* pVr
glEnd();
glDisable(GL_LIGHTING);
if (light)
{
glDisable(GL_LIGHTING);
glDisable(GL_NORMALIZE);
}
}