Added default colour and normal definition to the Geometry draw to prevent state

inheritance of these attributes from causing problems of Geometry which arn't
fully defined.
This commit is contained in:
Robert Osfield 2002-10-18 12:26:23 +00:00
parent 00fd58283c
commit 31e8323f17

View File

@ -412,6 +412,10 @@ void Geometry::drawImmediateMode(State& state)
unsigned int secondaryColorIndex = 0;
unsigned int fogCoordIndex = 0;
// if no values are defined for normal and color provide some defaults...
if (_normalBinding==BIND_OFF) glNormal3f(0.0f,0.0f,1.0f);
if (_colorBinding==BIND_OFF) glColor4f(1.0f,1.0f,1.0f,1.0f);
if (areFastPathsUsed())
{