Hi All,

I have now got the old .osg, .ive loaders working with the new
osg::Geometry, and got the new serializers working.  The way I've
tackled it was by storing the old deprecated IndexArray functionality
as UserData on the osg::Array that they were originally paired with.
This approach means that you can read and write the original data
intact even without the original access methods for the arrays.

However, I have temporarily reinstated the s/getVertexIndices() etc.
methods to help out with the translation work - these simply s/get the
user data hiding the fact that there isn't any ArrayData any more.
I'm actually now starting to wonder whether leaving these in place and
using a optional build to enable/disable them, this would at least
allow users to keep their code compiling.

If we do keep the option of building with the old array indices
methods then it also raises the question do we attempt some form of
fallback scheme to implement the unsupported paths.  Potentially one
could map the indexed arrays and rebuild and BIND_PER_PRIMITIVE
primitive sets to fast paths equivilants stored in an osg::Geometry.
There was an internal optimized osg::Geometry that kind of did this
job previously and would could re-instate this.

The other alternative is to just post process the osg::Geometry with
hidden indices and BIND_PER_PRIMITIVE at the scene graph
pre-processing stage and if one tries to render an osg::Geometry with
this old baggage you just return an error and do an non op of the
graphics front.  We could even use an optional compile to throw an
exception when the scene graph hits one of these old and now invalid
osg::Geometry to help users with debugging.

Thoughts on aiding the move to the cleaned up osg::Geometry?  What
would help your translation across?

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to