Hi Andreas, I have had a chance to do a second review and merged the changes in full. The only modification I have made is a tweak to the osgfont example to get it to compile.
I am still not happy with the Text::GlyphQuads::initGPUBufferObjects() as updates to the Text object will instigate a wholesale discard and replace of the buffers. For things like stats or text fields the Text can be updated on every frame, so it'd perform pretty bad with the new approach. Sharing a single buffer between all the GlyphQuads assigned to an osgText::Text object would be a better solution. Allocating the buffer so it's big enough to accommodate changes in size without reallocating would be sensible, but the osgText::Text object itself won't know how big the text will get until it's allocated. Perhaps if the Text has a DataVariance set to STATIC one could set the VBO's to just the size required, but have some mechanism for reallocating or allocating a little extra when the DataVatriance to DYNAMIC. I don't have any concrete ideas though, I'm really just throwing out ideas. With the changes now checked into svn/trunk at least we should have something that works under GL3 core profile even it's not optimal. In later rev's we can make things more optimal. Cheers, Robert.
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
