Hi Andrew, Yep this sounds like a bug, feel free to work and submit and fix to osg-submissions :-)
Robert. On Thu, May 20, 2010 at 5:29 PM, Andrew Cunningham <[email protected]> wrote: > Hi, > There is some code in the _computeCorrectBindingsAndArraySizes (below) that > assumes it is impossible to have numElements==numVertices in the normal array > and , for example, be BIND_PER_PRIMITIVE. The code resets to BIND_PER_VERTEX. > > Consider a series of triangle primitives making a "strip" that loops back on > itself, say 4 nodes on the top edge, and 4 on the bottom for a total of 8 > vertices. Like , for example, the sides of a cube as tris. > > The number of triangles to make this "strip" is actually 8. So in this case > numElements==numVertices and BIND_PER_PRIMITIVE is perfectly OK. > > > > > Code: > if (numElements==numVertices) > { > // correct the binding to per vertex. > if (arrayData.binding!=osg::Geometry::BIND_PER_VERTEX) > { > out<<"Warning: in > osg::Geometry::computeCorrectBindingsAndArraySizes() "<<std::endl > <<" "<<arrayName<<" binding has been reset to > BIND_PER_VERTEX"<<std::endl; > arrayData.binding = osg::Geometry::BIND_PER_VERTEX; > } > return; > } > > > > > > ... > > Andrew > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=28077#28077 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

