[osg-users] Sharing statesets across files

Zach Deedler mynamezach at gmail.com
Sun Sep 16 13:18:15 PDT 2007


Looks like you may also want to call this:

osgDB::Registry::instance()->getOrCreateSharedStateManager()->setShareMode(S
HARE_TEXTURES | SHARE_STATESETS);

since SHARE_TEXTURES is the default.

 

  _____  

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Matt
Franklin
Sent: Sunday, September 16, 2007 4:25 AM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Sharing statesets across files

 

Is there a way of including a proxy stateset node or referencing a stateset
stored in another file? I am trying to split up a single model into smaller
pagable chunks. However, my original model makes significant use of shared
statesets to maximise reuse of textures. When I break up my model each leaf
node includes its own copy of the shared stateset. The total disk space used
by the resulting fragments is a factor of ten larger than the original file.
This in itself is not a problem but the resulting texture memory usage is
also a factor of ten larger as a result of the lack of reuse.

Thanks in advance,

Matt 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070916/4e741961/attachment-0003.htm>


More information about the osg-users mailing list