I've refactored the single ReadedWriterVRML2.cpp into multiple files. The
reason for doing this was to break up the horribly long function
osg::ref_ptr<osg::Node> ReaderWriterVRML2::convertFromVRML(openvrml::node
*obj)

The fixes are:

* Added the source's parent directory as search directory for image files.
* The material properties are now set in the stateset of the Geode rather
than the Geometry. This will allow geometries to be reused with different
material properties in future updates.

NB: I planned for a caching scheme in which multiple occurences of the same
primitive (e.g., Cylinders with radius 0.8 and height 1.2), would use the
same Geometry object. Unfortunately, my planning moved me to other areas,
but I might still finish the caching scheme in a quiet hour. For the time
being I decided it would be a good thing to already submit my current
changes.

Gino van den Bergen
www.dtecta.com

Attachment: vrml.rar
Description: Binary data

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

Reply via email to