Oops... sorry, wrong mailing list... reposting...

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

----- "Sukender" <[email protected]> a écrit :

> Hi all,
> 
> According to you, what is the best way to remove unused
> statesets/stateattributes/images?
> 
> Example: I got a stateset with texture "0" at root node, but every
> Geode/Drawable also have a stateset with texture "0". So the root node
> stateset (well... texture attribute in that case) isn't used anymore.
> My goal is to remove the root node's texture/image.
> 
> My first idea was:
> - Traverse the graph
>   - Collect all statesets/stateattributes/uniforms in a set
>   - Remove from the collection the objects that are effectively used
> by any drawable (Stack statesets while traversing, use
> StateSet::merge())
> - Delete statesets/stateattributes/uniforms remaining in the set
> 
> Any better idea?
> 
> Thanks.
> 
> Sukender
> PVLE - Lightweight cross-platform game engine -
> http://pvle.sourceforge.net/
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to