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:
@@ -1,4 +1,5 @@
|
||||
#include <osg/Geode>
|
||||
#include <osg/Geometry>
|
||||
#include <osgDB/ObjectWrapper>
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
@@ -14,7 +15,10 @@ static bool readDrawables( osgDB::InputStream& is, osg::Geode& node )
|
||||
for ( unsigned int i=0; i<size; ++i )
|
||||
{
|
||||
osg::Drawable* drawable = dynamic_cast<osg::Drawable*>( is.readObject() );
|
||||
if ( drawable ) node.addDrawable( drawable );
|
||||
if ( drawable )
|
||||
{
|
||||
node.addDrawable( drawable );
|
||||
}
|
||||
}
|
||||
is >> is.END_BRACKET;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user