Hi Michael, BIND_PER_PRIMITIVE is indeed a really poor way to drive the OSG/OpenGL as modern OpenGL doesn't support this binding directly to the OSG has to jump through hoops to recreate this feature. Moving to BIND_PER_PRIMITIVE would be provide better peformance so you have my blessing if you want to dive in and ammend the plugin. I'd suggest retaining the old implementation selectable via on osg::Option setting as well even if it's not the default so others can get back the original implementation in case their applications required this specific arrangement.
Cheers, Robert. On 26 December 2012 22:08, Michael Schanne <[email protected]> wrote: > Hi, > > I have some models in my application that were provided to me in the .stl > file format, that I converted into .osg format using osgconv. I was looking > at the .osg file and I noticed it contained BIND_PER_PRIMITIVE for the > normals. I read elsewhere on the forum that this mode should be avoided as > it forces the app onto a slow path in OpenGL. I looked over the source code > for the stl plugin and it looks like everything is imported as TRIANGLES. If > this is the case, couldn't the normal vectors each be duplicated 3 times in > order to use BIND_PER_VERTEX instead? If this works, would it be worthwhile > for me to submit this change? > > ... > > Thank you! > > Cheers, > Michael > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51715#51715 > > > > > > _______________________________________________ > 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

