[osg-submissions] Fixes for VRML2 plugin

Gino van den Bergen gino at dtecta.com
Wed Mar 5 04:30:18 PST 2008


I've added a few fixes to the VRML 2.0 plugin:

1) Full DOS paths are now correctly opened by OpenVRML. A URL containing
a DOS path should be "file:///C:data/blah" rather than "file://C:data/blah".

2)  The last primitive defined in "coordIndex" is now added if the
"coordIndex" is not terminated by -1.

3) Smoothed normals are computed if no normal field is provided.
Currently, there is no support for "creaseAngle", so all edges (even the
ones sharper than the creaseAngle) are smoothed. I might add this in the
future if demand rises.

4) If an IndexedFaceSet contains only triangles or quads then the
primitive type is set to TRIANGLES or QUADS, and the primset becomes
DrawArrays rather than DrawArrayLengths.

Question: I noticed that for DrawArrays you can still provide an index
array. Would the rendering be faster if I'd create DrawElements primsets
rather than DrawArrays? Phrased differently, what is the benefit of
using DrawElements over DrawArrays, as there is clearly not a one-to-one
mapping of these concepts to their OpenGL counterparts?

5) Objects are added to the transparent bin and blend mode is enabled
only if the transparency is nonzero. Rendered transparent objects no
longer write the depth buffer.

Cheers,

Gino van den Bergen


 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReaderWriterVRML2.zip
Type: application/x-zip-compressed
Size: 7897 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080305/243c2216/attachment-0001.bin 


More information about the osg-submissions mailing list