Alborz Gharraee wrote:
Hi
I have a triangle mesh that contains vertex, triangle vertex index, and color
data. I used an osg::Geometry and it is rendered perfectly. Just two questions:
1. When I add the color data to the geometry, the application slows down. I
understand that per-primitive binding slows things down, but per-primitive
color data is all I have, so can I get better performance with the same data
set?
You should be able to write a function that expands the per-primitive
data to per-vertex data. You may have to duplicate vertices for this to
work (depending on the look you're going for), but the end result should
run faster regardless.
2. Can osg automatically generate surface (or vertex) normals or do I have to
write the code for that?
Look at osgUtil::SmoothingVisitor
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org