Moved the assignment of the normal binding to after the setNormalArray call

This commit is contained in:
Robert Osfield
2013-06-18 17:49:57 +00:00
parent de1eb14f8d
commit b2fa36f02b

View File

@@ -1012,10 +1012,10 @@ class SurfaceBin : public PrimitiveBin {
geometry->setDataVariance(osg::Object::STATIC);
geometry->setColorArray(material.getColorArray());
geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
osg::Vec3Array* normalArray = new osg::Vec3Array;
normalArray->setDataVariance(osg::Object::STATIC);
geometry->setNormalArray(normalArray);
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
osg::Vec3Array* vertexArray = new osg::Vec3Array;
vertexArray->setDataVariance(osg::Object::STATIC);
geometry->setVertexArray(vertexArray);