Hi,
I noticed that the Normal computation plugin (in release 3.0.1) doesn't 
consider the actual indices of vertices and normals when processing 
PrimitiveSetLists, it just assumes that they are stored linearly with no 
repetition. This - at least for my models - leads to crashes. I fixed this by 
using Geometry::PrimitiveSetList::index() method calls. The fix applies to all 
PrimitiveSetLists; however, I could only verify the fix on types TRIANGLES and 
TRIANGLE_STRIP with BIND_PER_VERTEX. If anyone could comment on how it behaves 
with BIND_PER_PRIMITIVE_SET, BIND_PER_PRIMITIVE, QUADS, and POLYGON, it would 
be great.

The proposed code is attached.
Thank you!

Cheers,
Martin

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53283#53283




Attachments: 
http://forum.openscenegraph.org//files/normals_148.cpp


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

Reply via email to