public

Inheritance Graph

graph BT
	ShaderState
	ShaderState --> State
	SkeletalAbstractRendererState --> ShaderState
	click ShaderState "classMinSG_1_1ShaderState"
	click State "classMinSG_1_1State"
	click SkeletalAbstractRendererState "classMinSG_1_1SkeletalAbstractRendererState"

Description

[ ShaderState ] > [ State ]

Public Types

   
   
typedef std::map< std::string, Rendering::Uniform > uniformMap_t

Protected Attributes

   
   
uniformMap_t uMap
   
Util::Reference < Rendering::Shader > shader

Public Functions

     
     
  ShaderState( Rendering::Shader * _shader)  
     
  ShaderState(const ShaderState & source)  
     
  ~ShaderState()  
     
void setShader( Rendering::Shader * s)  
     
Rendering::Shader * getShader()  
     
void setUniform(const Rendering::Uniform & value)  
     
void setUniform( FrameContext & context, const Rendering::Uniform & value)  
     
const uniformMap_t & getUniforms() const  
     
bool hasUniform(const std::string & name) const  
     
Rendering::Uniform getUniform(const std::string & name) const  
     
void removeUniform(const std::string & name)  
     
void removeUniform(const Rendering::Uniform & u)  
     
void removeUniforms()  
     
ShaderState * clone() const
> [ State ]

Protected Functions

   
   
stateResult_t doEnableState( FrameContext & context, Node * node, const RenderParam & rp)
   
void doDisableState( FrameContext & void, Node * void, const RenderParam & void)

Documentation

typedef
MinSG::ShaderState::uniformMap_t

public
 
 
typedef std::map< std::string, Rendering::Uniform > uniformMap_t

Defined in MinSG/Core/States/ShaderState.h:28


variable
MinSG::ShaderState::uMap

protected
 
 
uniformMap_t uMap

Defined in MinSG/Core/States/ShaderState.h:62


variable
MinSG::ShaderState::shader

protected
 
 
Util::Reference < Rendering::Shader > shader

Defined in MinSG/Core/States/ShaderState.h:63


function
MinSG::ShaderState::ShaderState

public
     
     
ShaderState( Rendering::Shader * _shader )

Defined in MinSG/Core/States/ShaderState.h:30


function
MinSG::ShaderState::ShaderState

public
     
     
ShaderState( const ShaderState & source )

Defined in MinSG/Core/States/ShaderState.h:31


function
MinSG::ShaderState::~ShaderState

public virtual
   
   
~ShaderState( )

Defined in MinSG/Core/States/ShaderState.h:32


function
MinSG::ShaderState::setShader

public inline
     
     
void setShader( Rendering::Shader * s )

Defined in MinSG/Core/States/ShaderState.h:34


function
MinSG::ShaderState::getShader

public inline
   
   
Rendering::Shader * getShader( )

Defined in MinSG/Core/States/ShaderState.h:35


function
MinSG::ShaderState::setUniform

public
     
     
void setUniform( const Rendering::Uniform & value )

sets the uniform value for this shader state. the uniform will be applied on next enable.

Defined in MinSG/Core/States/ShaderState.h:41


function
MinSG::ShaderState::setUniform

public
     
     
void setUniform( FrameContext & context,
  const Rendering::Uniform & value
)    

sets the uniform value for this shader state. if the shader is active the uniform will be applied immediately otherwise on next enable.

Defined in MinSG/Core/States/ShaderState.h:48


function
MinSG::ShaderState::getUniforms

public const inline
   
   
const uniformMap_t & getUniforms( ) const

Defined in MinSG/Core/States/ShaderState.h:50


function
MinSG::ShaderState::hasUniform

public const inline
     
     
bool hasUniform( const std::string & name ) const

Defined in MinSG/Core/States/ShaderState.h:51


function
MinSG::ShaderState::getUniform

public const
     
     
Rendering::Uniform getUniform( const std::string & name ) const

Defined in MinSG/Core/States/ShaderState.h:52


function
MinSG::ShaderState::removeUniform

public inline
     
     
void removeUniform( const std::string & name )

Defined in MinSG/Core/States/ShaderState.h:54


function
MinSG::ShaderState::removeUniform

public inline
     
     
void removeUniform( const Rendering::Uniform & u )

Defined in MinSG/Core/States/ShaderState.h:55


function
MinSG::ShaderState::removeUniforms

public inline
   
   
void removeUniforms( )

Defined in MinSG/Core/States/ShaderState.h:56


function
MinSG::ShaderState::clone

public const virtual
   
   
ShaderState * clone( ) const
> [ State ]

Defined in MinSG/Core/States/ShaderState.h:59


function
MinSG::ShaderState::doEnableState

protected virtual
     
     
stateResult_t doEnableState( FrameContext & context,
  Node * node,
  const RenderParam & rp
)    

Enable this state for the given node (=subtree). This function has to be implemented by derived classes. It is called byenableState.

Parameters

context
FrameContext to be used by this state.
node
Node that this state should be enabled for.
rp
Rendering options.

Returns

Special result enumerator

See also: stateResult_t for description of return type

Defined in MinSG/Core/States/ShaderState.h:65


function
MinSG::ShaderState::doDisableState

protected virtual
     
     
void doDisableState( FrameContext & void,
  Node * void,
  const RenderParam & void
)    

Disable this state for the given node (=subtree). It is called bydisableState.

Parameters

context
FrameContext to be used by this state.
node
Node that this state should be enabled for.
rp
Rendering options.

Defined in MinSG/Core/States/ShaderState.h:66