osgEarth 2.1.1
Typedefs | Functions

anonymous_namespace{ShaderUtils.cpp} Namespace Reference

Typedefs

typedef std::list< const
osg::StateSet * > 
StateSetStack

Functions

static
osg::StateAttribute::GLModeValue 
getModeValue (const StateSetStack &statesetStack, osg::StateAttribute::GLMode mode)

Typedef Documentation

typedef std::list<const osg::StateSet*> anonymous_namespace{ShaderUtils.cpp}::StateSetStack

Definition at line 29 of file ShaderUtils.cpp.


Function Documentation

static osg::StateAttribute::GLModeValue anonymous_namespace{ShaderUtils.cpp}::getModeValue ( const StateSetStack &  statesetStack,
osg::StateAttribute::GLMode  mode 
) [static]

Definition at line 32 of file ShaderUtils.cpp.

    {
        osg::StateAttribute::GLModeValue base_val = osg::StateAttribute::ON;
        for(StateSetStack::const_iterator itr = statesetStack.begin();
            itr != statesetStack.end();
            ++itr)
        {
            osg::StateAttribute::GLModeValue val = (*itr)->getMode(mode);
            if ((val & ~osg::StateAttribute::INHERIT)!=0)
            {
                if ((val & osg::StateAttribute::PROTECTED)!=0 ||
                    (base_val & osg::StateAttribute::OVERRIDE)==0)
                {
                    base_val = val;
                }
            }
        }
        return base_val;
    }

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines