Replaced deprecated osg::Geometry::set*Binding() usage

This commit is contained in:
Robert Osfield
2013-06-27 08:44:15 +00:00
parent 38bb71460a
commit c1ebc3ac0c
5 changed files with 10 additions and 16 deletions

View File

@@ -581,7 +581,7 @@ protected:
if (isGouraud())
{
// Color per vertex
geometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
if (geometry->getColorArray()) geometry->getColorArray()->setBinding(osg::Array::BIND_PER_VERTEX);
}
else
{
@@ -597,7 +597,7 @@ protected:
// Normal binding
if (isLit())
{
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX );
if (geometry->getNormalArray()) geometry->getNormalArray()->setBinding(osg::Array::BIND_PER_VERTEX);
}
else
{
@@ -1411,7 +1411,7 @@ protected:
if (mesh->isGouraud())
{
// Color per vertex
geometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
if (geometry->getColorArray()) geometry->getColorArray()->setBinding(osg::Array::BIND_PER_VERTEX);
}
else
{
@@ -1428,7 +1428,7 @@ protected:
// Normal binding
if (mesh->isLit())
{
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX );
if (geometry->getNormalArray()) geometry->getNormalArray()->setBinding(osg::Array::BIND_PER_VERTEX);
}
else
{