Removed deprecated usage of osg::Geometry::get*Binding()
This commit is contained in:
@@ -58,25 +58,25 @@ struct VertexAttribComparitor
|
||||
{
|
||||
VertexAttribComparitor(osg::Geometry& geometry)
|
||||
{
|
||||
add(geometry.getVertexArray(),osg::Geometry::BIND_PER_VERTEX);
|
||||
add(geometry.getNormalArray(),geometry.getNormalBinding());
|
||||
add(geometry.getColorArray(),geometry.getColorBinding());
|
||||
add(geometry.getSecondaryColorArray(),geometry.getSecondaryColorBinding());
|
||||
add(geometry.getFogCoordArray(),geometry.getFogCoordBinding());
|
||||
add(geometry.getVertexArray());
|
||||
add(geometry.getNormalArray());
|
||||
add(geometry.getColorArray());
|
||||
add(geometry.getSecondaryColorArray());
|
||||
add(geometry.getFogCoordArray());
|
||||
unsigned int i;
|
||||
for(i=0;i<geometry.getNumTexCoordArrays();++i)
|
||||
{
|
||||
add(geometry.getTexCoordArray(i),osg::Geometry::BIND_PER_VERTEX);
|
||||
add(geometry.getTexCoordArray(i));
|
||||
}
|
||||
for(i=0;i<geometry.getNumVertexAttribArrays();++i)
|
||||
{
|
||||
add(geometry.getVertexAttribArray(i),geometry.getVertexAttribBinding(i));
|
||||
add(geometry.getVertexAttribArray(i));
|
||||
}
|
||||
}
|
||||
|
||||
void add(osg::Array* array, osg::Geometry::AttributeBinding binding)
|
||||
void add(osg::Array* array)
|
||||
{
|
||||
if (binding==osg::Geometry::BIND_PER_VERTEX && array)
|
||||
if (array && array->getBinding()==osg::Array::BIND_PER_VERTEX)
|
||||
{
|
||||
for(ArrayList::const_iterator itr=_arrayList.begin();
|
||||
itr!=_arrayList.end();
|
||||
@@ -216,13 +216,13 @@ void TriStripVisitor::stripify(Geometry& geom)
|
||||
{
|
||||
if (geom.containsDeprecatedData()) geom.fixDeprecatedData();
|
||||
|
||||
if (geom.getNormalBinding()==osg::Geometry::BIND_PER_PRIMITIVE_SET) return;
|
||||
if (osg::getBinding(geom.getNormalArray())==osg::Array::BIND_PER_PRIMITIVE_SET) return;
|
||||
|
||||
if (geom.getColorBinding()==osg::Geometry::BIND_PER_PRIMITIVE_SET) return;
|
||||
if (osg::getBinding(geom.getColorArray())==osg::Array::BIND_PER_PRIMITIVE_SET) return;
|
||||
|
||||
if (geom.getSecondaryColorBinding()==osg::Geometry::BIND_PER_PRIMITIVE_SET) return;
|
||||
if (osg::getBinding(geom.getSecondaryColorArray())==osg::Array::BIND_PER_PRIMITIVE_SET) return;
|
||||
|
||||
if (geom.getFogCoordBinding()==osg::Geometry::BIND_PER_PRIMITIVE_SET) return;
|
||||
if (osg::getBinding(geom.getFogCoordArray())==osg::Array::BIND_PER_PRIMITIVE_SET) return;
|
||||
|
||||
// no point tri stripping if we don't have enough vertices.
|
||||
if (!geom.getVertexArray() || geom.getVertexArray()->getNumElements()<3) return;
|
||||
@@ -553,7 +553,7 @@ void TriStripVisitor::stripify(Geometry& geom)
|
||||
1.0f);
|
||||
}
|
||||
geom.setColorArray(colors);
|
||||
geom.setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE_SET);
|
||||
geom.setColorBinding(osg::Array::BIND_PER_PRIMITIVE_SET);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user