Cleaned up usage of BIND_PER_PRIMITIVE where possible.

This commit is contained in:
Robert Osfield
2013-06-19 16:24:59 +00:00
parent 9c127c2bca
commit df075ef9bb
16 changed files with 97 additions and 96 deletions

View File

@@ -136,8 +136,6 @@ class ObjPrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
write(i2);
write(i3);
_fout << std::endl;
// not sure if this is correct?
if(_geo->getNormalBinding() && _geo->getNormalBinding() == osg::Geometry::BIND_PER_PRIMITIVE) ++_normalIndex;
}
// operator for lines
@@ -147,8 +145,6 @@ class ObjPrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
write(i1);
write(i2);
_fout << std::endl;
// not sure if this is correct?
if(_geo->getNormalBinding() && _geo->getNormalBinding() == osg::Geometry::BIND_PER_PRIMITIVE) ++_normalIndex;
}
// operator for points
@@ -157,8 +153,6 @@ class ObjPrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
_fout << "p ";
write(i1);
_fout << std::endl;
// not sure if this is correct?
if(_geo->getNormalBinding() && _geo->getNormalBinding() == osg::Geometry::BIND_PER_PRIMITIVE) ++_normalIndex;
}
virtual void begin(GLenum mode)
@@ -524,6 +518,8 @@ void OBJWriterNodeVisitor::processGeometry(osg::Geometry* geo, osg::Matrix& m) {
_fout << std::endl;
_fout << "o " << getUniqueName( geo->getName().empty() ? geo->className() : geo->getName() ) << std::endl;
if (geo->containsDeprecatedData()) geo->fixDeprecatedData();
processStateSet(_currentStateSet.get());
processArray("v", geo->getVertexArray(), m, false);