diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 698f72b64..9f62e42ec 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -361,15 +361,15 @@ void Geometry::drawImmediateMode(State& state) switch(secondaryColorType) { case(Array::UByte4ArrayType): - s_glSecondaryColor3ubv(reinterpret_cast(colorPointer)); + s_glSecondaryColor3ubv(reinterpret_cast(secondaryColorPointer)); break; case(Array::Vec3ArrayType): - s_glSecondaryColor3fv(reinterpret_cast(colorPointer)); + s_glSecondaryColor3fv(reinterpret_cast(secondaryColorPointer)); break; default: break; } - colorPointer += colorStride; + secondaryColorPointer += secondaryColorStride; } if (fogCoordBinding==BIND_PER_PRIMITIVE)