osgEarth 2.1.1
Public Types | Public Member Functions | Static Public Member Functions

anonymous_namespace{ShaderComposition.cpp}::StateHack Class Reference

List of all members.

Public Types

typedef std::pair< const
osg::StateAttribute
*, osg::StateAttribute::OverrideValue > 
AttributePair
typedef std::vector
< AttributePair
AttributeVec

Public Member Functions

const AttributeVecgetAttributeVec (const osg::StateAttribute *attribute) const

Static Public Member Functions

static const AttributeVecGetAttributeVec (const osg::State &state, const osg::StateAttribute *attribute)

Detailed Description

A hack for OSG 2.8.x to get access to the state attribute vector.

Definition at line 38 of file ShaderComposition.cpp.


Member Typedef Documentation

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.


Member Function Documentation

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;
        }

Here is the caller graph for this function:

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 );
        }

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines