From Sebastian Messerschmidt, "I've taken some time and refactored some places where the old set*Binding were used."

This commit is contained in:
Robert Osfield
2013-06-26 16:16:23 +00:00
parent bead0740f2
commit a459033eff
13 changed files with 25 additions and 44 deletions

View File

@@ -62,8 +62,7 @@ osg::Geometry* createBackgroundRectangle(const osg::Vec3& pos, const float width
osg::Vec4Array* colors = new osg::Vec4Array;
colors->push_back(color);
geometry->setColorArray(colors);
geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
geometry->setColorArray(colors, osg::Array::BIND_OVERALL);
osg::DrawElementsUInt *base = new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS,0);
base->push_back(0);
@@ -133,8 +132,7 @@ struct StatsGraph : public osg::MatrixTransform
void setColor(const osg::Vec4& color) {
osg::Vec4Array* colors = new osg::Vec4Array;
colors->push_back(color);
setColorArray(colors);
setColorBinding(osg::Geometry::BIND_OVERALL);
setColorArray(colors, osg::Array::BIND_OVERALL);
}
};