AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxOSG::RenderStateManager Class Referenceabstract

#include <RenderStateManager.h>

+ Inheritance diagram for agxOSG::RenderStateManager:

Classes

class  RenderState
 
class  ShaderState
 

Public Types

enum  Priority { HIGHEST_PRIORITY = 2147483647, LOWEST_PRIORITY = 10000, DEFAULT_PRIORITY = 1073741824 }
 Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More...
 
typedef agx::ref_ptr< RenderState > RenderStateRef
 
enum  Values {
  OFF = osg::StateAttribute::OFF, ON = osg::StateAttribute::ON, OVERRIDE = osg::StateAttribute::OVERRIDE, PROTECTED = osg::StateAttribute::PROTECTED,
  INHERIT = osg::StateAttribute::INHERIT
}
 

Public Member Functions

void addRenderState (RenderState *renderState)
 
void addShaderState (ShaderState *shaderState)
 
void addTexture (const std::string &name, osg::Texture *texture)
 
void clear ()
 Remove all previous configurations, Shader/RenderStates. More...
 
osg::Program * createProgram (const std::string &name)
 
osg::Shader * createShader (const std::string &name, const std::string &shader, osg::Shader::Type type, bool isAFile)
 
osg::Program * findProgram (const std::string &name)
 
RenderState * findRenderState (const std::string &name)
 
osg::Shader * findShader (const std::string &name, osg::Shader::Type type)
 
ShaderState * findShaderState (const std::string &name)
 
osg::Texture * findTexture (const std::string &name)
 
virtual std::string getClassName () const =0
 
int getPriority () const
 Return the shutdown priority of the singleton instance. More...
 
void parse (agxCFG::ConfigScript *cfg)
 
void reset ()
 Will call clear and then init to reinitialize back to default state. More...
 

Static Public Member Functions

static RenderStateManager * instance (void)
 Return the singleton object. More...
 
template<typename T >
static void parseUniform (T *obj, agxCFG::ConfigScript *cfg)
 

Protected Member Functions

void _shutdown ()
 

Detailed Description

Definition at line 50 of file RenderStateManager.h.

Member Typedef Documentation

Member Enumeration Documentation

enum agx::Singleton::Priority
inherited

Specifies the ranges of the priority which can be assigned to a singleton at the time of creation.

Enumerator
HIGHEST_PRIORITY 

The highest priority that can be given to a singleton.

LOWEST_PRIORITY 

The lowest priority that can be given to a singleton.

DEFAULT_PRIORITY 

The default priority given to a singleton.

Definition at line 35 of file Singleton.h.

Enumerator
OFF 

means that associated GLMode and Override is disabled.

ON 

means that associated GLMode is enabled and Override is disabled.

OVERRIDE 

Overriding of GLMode's or StateAttributes is enabled, so that state below it is overridden.

PROTECTED 

Protecting of GLMode's or StateAttributes is enabled, so that state from above cannot override this and below state.

INHERIT 

means that GLMode or StateAttribute should be inherited from above.

Definition at line 54 of file RenderStateManager.h.

Member Function Documentation

void agx::Singleton::_shutdown ( )
protectedinherited
void agxOSG::RenderStateManager::addRenderState ( RenderState *  renderState)
void agxOSG::RenderStateManager::addShaderState ( ShaderState *  shaderState)
void agxOSG::RenderStateManager::addTexture ( const std::string &  name,
osg::Texture *  texture 
)
void agxOSG::RenderStateManager::clear ( )

Remove all previous configurations, Shader/RenderStates.

Begin fresh.

osg::Program* agxOSG::RenderStateManager::createProgram ( const std::string &  name)
osg::Shader* agxOSG::RenderStateManager::createShader ( const std::string &  name,
const std::string &  shader,
osg::Shader::Type  type,
bool  isAFile 
)
osg::Program* agxOSG::RenderStateManager::findProgram ( const std::string &  name)
RenderState* agxOSG::RenderStateManager::findRenderState ( const std::string &  name)
osg::Shader* agxOSG::RenderStateManager::findShader ( const std::string &  name,
osg::Shader::Type  type 
)
ShaderState* agxOSG::RenderStateManager::findShaderState ( const std::string &  name)
osg::Texture* agxOSG::RenderStateManager::findTexture ( const std::string &  name)
virtual std::string agx::Singleton::getClassName ( ) const
pure virtualinherited
int agx::Singleton::getPriority ( ) const
inherited

Return the shutdown priority of the singleton instance.

static RenderStateManager* agxOSG::RenderStateManager::instance ( void  )
static

Return the singleton object.

void agxOSG::RenderStateManager::parse ( agxCFG::ConfigScript *  cfg)
template<typename T >
static void agxOSG::RenderStateManager::parseUniform ( T *  obj,
agxCFG::ConfigScript *  cfg 
)
inlinestatic

Definition at line 196 of file RenderStateManager.h.

References LOGGER_END, LOGGER_ERROR, and agx::Container::size().

void agxOSG::RenderStateManager::reset ( )

Will call clear and then init to reinitialize back to default state.


The documentation for this class was generated from the following file: