Replaced deprecated osg::Geometry::set*Binding() usage
This commit is contained in:
parent
55416d83b3
commit
7ee05a345a
@ -814,8 +814,7 @@ void GeometryTechnique::generateGeometry(BufferData& buffer, Locator* masterLoca
|
||||
geometry->setVertexArray(VNG._vertices.get());
|
||||
|
||||
// allocate and assign normals
|
||||
geometry->setNormalArray(VNG._normals.get());
|
||||
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
geometry->setNormalArray(VNG._normals.get(), osg::Array::BIND_PER_VERTEX);
|
||||
|
||||
|
||||
// allocate and assign tex coords
|
||||
@ -864,8 +863,7 @@ void GeometryTechnique::generateGeometry(BufferData& buffer, Locator* masterLoca
|
||||
osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array(1);
|
||||
(*colors)[0].set(1.0f,1.0f,1.0f,1.0f);
|
||||
|
||||
geometry->setColorArray(colors.get());
|
||||
geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
|
||||
geometry->setColorArray(colors.get(), osg::Array::BIND_OVERALL);
|
||||
|
||||
//
|
||||
// populate vertex and tex coord arrays
|
||||
|
@ -1054,8 +1054,7 @@ OSGTEXT_EXPORT osg::Geometry* computeShellGeometry(osg::Geometry* glyphGeometry,
|
||||
#if 1
|
||||
osg::Vec4Array* new_colours = new osg::Vec4Array;
|
||||
new_colours->push_back(osg::Vec4(1.0,1.0,1.0,0.2));
|
||||
text_geometry->setColorArray(new_colours);
|
||||
text_geometry->setColorBinding(osg::Geometry::BIND_OVERALL);
|
||||
text_geometry->setColorArray(new_colours, osg::Array::BIND_OVERALL);
|
||||
|
||||
|
||||
osg::StateSet* stateset = text_geometry->getOrCreateStateSet();
|
||||
|
@ -142,8 +142,7 @@ static void smooth_old(osg::Geometry& geom)
|
||||
{
|
||||
nitr->normalize();
|
||||
}
|
||||
geom.setNormalArray( normals );
|
||||
geom.setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
geom.setNormalArray( normals, osg::Array::BIND_PER_VERTEX);
|
||||
|
||||
geom.dirtyDisplayList();
|
||||
}
|
||||
@ -621,8 +620,7 @@ static void smooth_new(osg::Geometry& geom, double creaseAngle)
|
||||
if (!normals || (normals && normals->size() != vertices->size()))
|
||||
{
|
||||
normals = new osg::Vec3Array(vertices->size());
|
||||
geom.setNormalArray(normals);
|
||||
geom.setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
geom.setNormalArray(normals, osg::Array::BIND_PER_VERTEX);
|
||||
}
|
||||
|
||||
osg::TriangleIndexFunctor<SmoothTriangleIndexFunctor> stif;
|
||||
|
Loading…
Reference in New Issue
Block a user