Hi Lionel,

Personally I haven't done any work with the SharedStateManager, it being a community contribution that I have yet had the need to deploy in and test in my own work, so I'm a bit cold on this particular topic.  I have quickly just reviewed the code and so can make a few hopefully useful comments.

You are right, ideally the sharing should occur before any download of OpenGL objects.  Secondly, yes the state manager is doing the share operation during the merge of the scene graph operation which is after the objects have been downloaded so its not doing the ideal thing.

So.. the next question is can be move the share operation into the DatabasePager's thread main loop, after the load but prior to add the database request being added to the "to compile list".  The gotcha I can see with this would be thread safety of this operation - or more specifically the share() and prune() methods would both need to be called from the same thread, or for all the internal structures of SharedStateManager to be mutexed.

Robert.

On 9/8/06, Lionel Lagarde <[EMAIL PROTECTED]> wrote:
Hi,

I have followed some DatabasePager requests.

in the Databasepager, a request follow this path:
- requestFile -> _fileRequestList
- _fileRequestList -> /loading/ -> _dataToCompileList
- _dataToCompileList -> /compilation/ -> _dataToMergeList
- _dataToMergeList -> SharedStateManager -> PagedLOD child

My DatabasePager is configured to compile the loaded
sub-graph and my ShareStateManager is configured to share
the textures.

The loaded sub-graph is compiled before the state sharing stage.
When the sub-graph is compiled, the textures are uploaded in the
video memory. Then, the SharedStateManager try to share textures
between the differents StateSet and unload the the newly uploaded
texture.


To avoid unnecessary texture uploads, the SharedStateManager should
process the loaded sub-graphs before the compilation stage. No ?



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to