From c1831b21f71d53c4b2aab8bcbb02f9d793b6a158 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 20 Jan 2003 11:02:27 +0000 Subject: [PATCH] Made the setting of default glNormal and glColor values an compile option via #ifdef USE_DEFAULT_NORMAL and USE_DEFAULT_COLOR defines respectively. --- src/osg/Geometry.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index d4b3e1198..720137685 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -493,9 +493,14 @@ void Geometry::drawImplementation(State& state) const unsigned int secondaryColorIndex = 0; unsigned int fogCoordIndex = 0; +#if USE_DEFAULT_NORMAL // if no values are defined for normal and color provide some defaults... if (_normalBinding==BIND_OFF) glNormal3f(0.0f,0.0f,1.0f); +#endif + +#if ISE_DEFAULT_COLOUR if (_colorBinding==BIND_OFF) glColor4f(1.0f,1.0f,1.0f,1.0f); +#endif if (areFastPathsUsed()) {