Hi Lionel, I have just done another review of your changes. I am now pretty comfortable with the general approach but not fully with the naming and implementation.
Having a bool per BufferDataEntry works fine for cases where only one OpenGL object will read from buffer, while this is the usual case, might there be cases where one BufferData object might be shared - i.e. two Texture's sharing the same osg::Image. While this isn't optimal, it still can happen in scene graphs if a loader doesn't do it's job efficiently are sharing state, I mention this as the OpenFlight plugin is a real culprit for this and needs optimizing to avoid duplicate state. Given the possibility of sharing BuferData I do wonder if a uint might be more appropriate Such a change will require us to increment the number of reads required each time we associated a BufferData object with a GL object which could get kinda sticky. The naming of hasAllBufferDataBeenRead() is fine, but I hasReadBufferData(const osg::BuferData*) doesn't quite work for me as it it's a bit ambiguous - it sounds like a question, but in fact it's a statement of fact and really should read clearly as such. setBufferDataHasBeenRead(const osg::BuferData*) might be more clear. However, the naming would all change if we decide to go for handling that possibility of sharing a BufferData object between multiple arrays or textures. Thoughts? Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
