osgEarth 2.1.1
|
Public Types | |
typedef std::pair< const osg::StateAttribute *, osg::StateAttribute::OverrideValue > | AttributePair |
typedef std::vector < AttributePair > | AttributeVec |
Public Member Functions | |
const AttributeVec * | getAttributeVec (const osg::StateAttribute *attribute) const |
Static Public Member Functions | |
static const AttributeVec * | GetAttributeVec (const osg::State &state, const osg::StateAttribute *attribute) |
A hack for OSG 2.8.x to get access to the state attribute vector.
Definition at line 38 of file ShaderComposition.cpp.
typedef std::pair<const osg::StateAttribute*,osg::StateAttribute::OverrideValue> anonymous_namespace{ShaderComposition.cpp}::StateHack::AttributePair |
Definition at line 41 of file ShaderComposition.cpp.
typedef std::vector<AttributePair> anonymous_namespace{ShaderComposition.cpp}::StateHack::AttributeVec |
Definition at line 42 of file ShaderComposition.cpp.
const AttributeVec* anonymous_namespace{ShaderComposition.cpp}::StateHack::getAttributeVec | ( | const osg::StateAttribute * | attribute | ) | const [inline] |
Definition at line 44 of file ShaderComposition.cpp.
{
osg::State::AttributeMap::const_iterator i = _attributeMap.find( attribute->getTypeMemberPair() );
return i != _attributeMap.end() ? &(i->second.attributeVec) : 0L;
}
static const AttributeVec* anonymous_namespace{ShaderComposition.cpp}::StateHack::GetAttributeVec | ( | const osg::State & | state, |
const osg::StateAttribute * | attribute | ||
) | [inline, static] |
Definition at line 50 of file ShaderComposition.cpp.
{ const StateHack* sh = reinterpret_cast< const StateHack* >( &state ); return sh->getAttributeVec( attribute ); }