Hi Robert,

Would you consider changing BIND_PER_PRIMITIVE code to do some kind of internal conversion to fast path rendering, such as expanding the arrays by 3x (duplicating the color or normal for each vertex) so that it can use the per-vertex rendering path? I have certainly written code where I wanted per-face coloring or sharp edged shading (same normal across the face) and PER_PRIMITIVE captures my intent better than using PER_VERTEX and having to duplicate the colors/normals. It's not a big deal, but having the concept handled by osg::Geometry is more convenient than handling it in client code --- as you've noted, even in the examples PER_PRIMITIVE is used quite a bit.

- Peter

On 6/4/2013 5:14 AM, Robert Osfield wrote:
On 4 June 2013 09:42, Robert Osfield <robert.osfi...@gmail.com> wrote:
My current action plan is to get GeometryNew.cpp to build and run with
the osggeometry example
I have now got my quick clean up of Geometry as GeometryNew class with
osgeometry compiling and running correctly. My GeometryNew class
removes support for vertex indices.  My next step is to look at
BIND_PER_PRIMITIVE.  While vertex indices aren't actually used in the
core OSG BIND_PER_PRIMITIVE is quite widely used in the examples.
They really shouldn't be though as it means that they are all forces
slow paths in osg::Geometry.

I don't know yet whether to check in GeometryNew, or whether to wait
till I've done enough work to renamed the old Geometry to
GeometryDeprecated and rename GeometryNew to Geometry.  I'm currently
inclined to do this work in stages and check in GeometryNew even if
it's just a temporary class name.

Again I welcome feedback from the community.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


--
Peter Amstutz
Senior Software Engineer
Technology Solutions Experts
Natick, MA
02131

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to