Hi Stan, On 4 December 2013 18:00, Stan Coleby <[email protected]>wrote:
> Robert, > > Thank you for the wonderful job that you have been doing on OSG. I have > been using it for over 10 years. > Thanks. > I am trying to update my application from 3.0.1 to 3.2.1 and discovered > that osg::geometry class has deprecated the indices capabilities. I think > that functionally that has been around for years should not be quickly > eliminated like this. > The functionality has been deprecated for YEARS. All the documentation in the osg::Geometry class has made it clear that you shouldn't use these deprecated functionality. The OSG has had to had to emulate indices functionality as modern OpenGL doesn't support it at. I have for YEARS being telling members of the community that do not use indices as they are deprecated and the emulation is very costly on CPU overhead. For YEARS I have been saying that my plan was to remove this functionality. When I did eventually remove it I did it discussing the changes fully with the community. I couldn't have been more public about seeking of feedback from the community. When I removed the functionality I provided an automatic conversion of old data with the deprecated functionality across to the compliant osg::Geometry. I also provided a subclass from osg::Geometry that provides the old API as before but within a deprecated_osg namespace. Go look at the include/osg/Geometry header. > This is going to cost me a lot of time redesigning everything. > I'm sorry but we can't improve the OSG by holding it back to those who ignore calls to avoid deprecated functionality. There was plenty of warning over the years and explanation of the issues. Making changes doesn't normally involve massive changes, the rest of the community has coped fine. > > My application deals with large amounts of lidar data. (22 million points > per scan, 20-50 scans per scene; that’s a 1B points). In order to do this > I have to cache and swap data a lot. I am using your IVE file to quickly > move data in and out of memory. By removing the indices from > osg::geometry, the OSG and IVE files will explode to 4 X the size and take > 4 X longer to swap in and out. I only store the points once and use the > indices to create the polygonal geometries when I need then. Not > everything is always being displayed. I rely on osg::geometry as a data > storage object in memory everywhere. > It sounds like you are doing something wrong with how you represent your data. osg::Geometry supports glDrawElements via the osg::DrawElements primitive set, this has always been available and has long be the recommend way to pass indices to OpenGL - it's fully supported by all modern variants of OpenGL and OpenGL ES. Using vertex indices has never actually been supported by OpenGL, even OpenGL 1.0, but used by possible to use display lists and glBegin/glEnd to mimic it. glBegin/glEnd is no longer support so the OSG had to emulate it in software expanding all vertex indices arrays to non index arrays on the fly. This consumed memory and introduce a high CPU overhead. It was a really bad for performance and why it was so strongly recommended not use use vertex indices. > > I know that I can use the deprecated_osg::Geomerty in the short term but > please consider creating a new osg::IndicesGeometry class to preserve > functionality of Indices in the OSG and IVE files and don’t explode the > data until it is needed by OpenGL. I think the explosion of the data into > OpenGL is best served inside the IndicesGeometry class allowing > applications to manage the data in Indices form. > Vertex indices are a BAD BAD BAD solution. I STRONGLY recommend you ditch the idea that they are worthy of keeping, especially if you want to efficiently move lots of data from disk, to main memory to GPU. Please spend the time to understand how OpenGL and the OSG use vertex arrays, vertex buffer objects and the indexed primitive sets. These all work together an enable very efficient data managent without the need for big CPU overheads. Robert.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

