Classes |
| struct | CompareStateAttributes |
| struct | CompareStateSets |
Public Types |
| enum | ShareMode {
SHARE_NONE = 0,
SHARE_STATIC_TEXTURES = 1<<0,
SHARE_UNSPECIFIED_TEXTURES = 1<<1,
SHARE_DYNAMIC_TEXTURES = 1<<2,
SHARE_STATIC_STATESETS = 1<<3,
SHARE_UNSPECIFIED_STATESETS = 1<<4,
SHARE_DYNAMIC_STATESETS = 1<<5,
SHARE_TEXTURES = SHARE_STATIC_TEXTURES | SHARE_UNSPECIFIED_TEXTURES,
SHARE_STATESETS = SHARE_STATIC_STATESETS | SHARE_UNSPECIFIED_STATESETS,
SHARE_ALL
} |
Public Member Functions |
| | SharedStateManager (unsigned int mode=SHARE_ALL) |
| | META_NodeVisitor ("osgDB","SharedStateManager") void setShareMode(unsigned int mode) |
| unsigned int | getShareMode () |
| void | prune () |
| void | share (osg::Node *node, OpenThreads::Mutex *mt=0) |
| void | apply (osg::Node &node) |
| void | apply (osg::Geode &geode) |
| bool | isShared (osg::StateSet *stateSet) |
| bool | isShared (osg::Texture *texture) |
| void | releaseGLObjects (osg::State *state) const |
Protected Types |
typedef std::set< osg::ref_ptr
< osg::StateAttribute >
, CompareStateAttributes > | TextureSet |
typedef std::set< osg::ref_ptr
< osg::StateSet >
, CompareStateSets > | StateSetSet |
typedef std::pair
< osg::StateAttribute *, bool > | TextureSharePair |
typedef std::map
< osg::StateAttribute
*, TextureSharePair > | TextureTextureSharePairMap |
typedef std::pair
< osg::StateSet *, bool > | StateSetSharePair |
typedef std::map
< osg::StateSet
*, StateSetSharePair > | StateSetStateSetSharePairMap |
Protected Member Functions |
| bool | shareTexture (osg::Object::DataVariance variance) |
| bool | shareStateSet (osg::Object::DataVariance variance) |
| void | process (osg::StateSet *ss, osg::Object *parent) |
| osg::StateAttribute * | find (osg::StateAttribute *sa) |
| osg::StateSet * | find (osg::StateSet *ss) |
| void | setStateSet (osg::StateSet *ss, osg::Object *object) |
| void | shareTextures (osg::StateSet *ss) |
Protected Attributes |
| TextureSet | _sharedTextureList |
| StateSetSet | _sharedStateSetList |
| TextureTextureSharePairMap | tmpSharedTextureList |
| StateSetStateSetSharePairMap | tmpSharedStateSetList |
| unsigned int | _shareMode |
| bool | _shareTexture [3] |
| bool | _shareStateSet [3] |
| OpenThreads::Mutex * | _mutex |
| OpenThreads::Mutex | _listMutex |