Hi Robert, I think it is a good idea to clean up the Geometry interface, to make the code more clear, concise and simpler to maintain, and to help OSG/OpenGL beginners to automatically use the fast paths.
Kind regards, Ruben -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: dinsdag 4 juni 2013 10:42 To: OpenSceneGraph Users Subject: Re: [osg-users] Deprecating vertex indices in osg::Geometry I have now started looking into what changes would be required to osg::Geometry and have decided to make a copy of Geometry called GoemetryNew and cut this down to see how easy it will be clean this class up and what the knock on effects might be. Now I have dived in and begun the process one what is clear is just how much the implementation of Geometry.cpp was complicated by the support for indices - the size of GeometryNew.cpp text file is now 1982 bytes vs 2763 for the old Geometry.cpp. Getting rid of indices will reduce footprint and also will make the code faster as they will be less checks to see if indices are there and need something special doing for them. Another element that jumps out as out of step with modern OpenGL is support for PER_PRIMITIVE binding of arrays - this still forces OpenGL slow paths and again complicates the code. I believe that osg::Geometry really should just support fast paths so as part of the cleanup it would reasonable to drop this from GeometryNew.cpp as well. I will tackle the indices first though. My current action plan is to get GeometryNew.cpp to build and run with the osggeometry example, then look for feedback from the community. If things look viable then the next step will be rename GeometryNew.cpp to Geometry.cpp and renamed the existing Geometry.cpp to GeometryDeprecated.cpp. This step will require some games on the serialization front to return backwards compatibility. Another area of change would be looking at Geometry::ArrayData - this currently contains array, indices, binding and normalize variables. My first step is to simply remove indices, but I'm thinking that binding and normalize might both be suitable for moving into osg::Array and for ArrayData to be removed entirely. Thoughts? Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/emaildisclaimer _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org