Clean up up osg::Geometry, removing long deprecated support for array indices and BIND_PER_PRIMITIVE binding that forced OpenGL slow paths. osg::Geometry is now smaller and only supports OpenGL fasts paths.
New methods osg::Geometry::containsDeprecatedData() and osg::Geometry::fixDeprecatedData() provide a means for converting geometries that still use the array indices and BIND_PER_PRIMITIVE across to complient versions. Cleaned up the rest of the OSG where use of array indices and BIND_PER_PRIMITIVE were accessed or used.
This commit is contained in:
@@ -597,11 +597,11 @@ void BumpMapping::prepareGeometry(osg::Geometry* geo)
|
||||
osg::ref_ptr<osgUtil::TangentSpaceGenerator> tsg = new osgUtil::TangentSpaceGenerator;
|
||||
tsg->generate(geo, _normal_unit);
|
||||
if (!geo->getVertexAttribArray(6))
|
||||
geo->setVertexAttribData(6, osg::Geometry::ArrayData(tsg->getTangentArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
|
||||
geo->setVertexAttribArray(6, tsg->getTangentArray());
|
||||
if (!geo->getVertexAttribArray(7))
|
||||
geo->setVertexAttribData(7, osg::Geometry::ArrayData(tsg->getBinormalArray(), osg::Geometry::BIND_PER_VERTEX, GL_FALSE));
|
||||
geo->setVertexAttribArray(7, tsg->getBinormalArray());
|
||||
if (!geo->getVertexAttribArray(15))
|
||||
geo->setVertexAttribData(15, osg::Geometry::ArrayData(tsg->getNormalArray(), osg::Geometry::BIND_PER_VERTEX, GL_FALSE));
|
||||
geo->setVertexAttribArray(15, tsg->getNormalArray());
|
||||
}
|
||||
|
||||
void BumpMapping::prepareNode(osg::Node* node)
|
||||
|
||||
Reference in New Issue
Block a user