32 #ifndef ShaderNode_INCLUDE_ONCE 33 #define ShaderNode_INCLUDE_ONCE 105 if (
child(i) == node)
124 for(
unsigned i=start; i<start+count; ++i)
167 for(std::map< EEnable, EnableInfo>::const_iterator en_it =
mEnables.begin(); en_it !=
mEnables.end(); ++en_it)
168 if(en_it->second.mOn)
171 for(UniformsMap::const_iterator unif_it =
mUniforms.begin(); unif_it !=
mUniforms.end(); ++unif_it)
200 if (!(par_it->second.mInheritance & 0x02) || (cur_it->second.mInheritance &
IN_Sticky))
209 if (!par_it->second.mOn)
213 EnablesMap::const_iterator cur_it =
mEnables_Final.find(par_it->first);
217 if (!(par_it->second.mInheritance & 0x02) || (cur_it->second.mInheritance &
IN_Sticky))
228 UniformsMap::const_iterator cur_it =
mUniforms_Final.find(par_it->first);
232 if (!(par_it->second.mInheritance & 0x02) || (cur_it->second.mInheritance &
IN_Sticky))
const Shader * shader() const
const EnablesMap & enables() const
void eraseAllUniforms()
Equivalent to gocUniformSet()->eraseAllUniforms(...)
void eraseRenderState(RenderState *rs, int index)
void eraseChildren(unsigned start, unsigned count)
RenderStatesMap & renderStates()
void inherit(ShaderNode *parent)
const ShaderNode * child(unsigned i) const
int findChild(const ShaderNode *node) const
std::vector< ref< ShaderNode > > mNodes
std::map< ERenderState, RenderStateInfo > RenderStatesMap
EInheritance mInheritance
The ShaderNode class is used to conveniently manage complex hierarchies of Shader[s].
RenderStatesMap mRenderStates
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
const RenderStatesMap & renderStates() const
void eraseChild(unsigned index)
ShaderNode * child(unsigned i)
Visualization Library main namespace.
Propagates to children; does not override children settings; can be overridden.
ShaderNode's representation of a RenderState.
Base class for most of the OpenGL render state wrapper classes.
std::map< std::string, UniformInfo > UniformsMap
void setRenderState(RenderStateNonIndexed *renderstate)
size_t childrenCount() const
std::map< EEnable, EnableInfo > EnablesMap
ShaderNode's representation of an enable.
The base class for all the reference counted objects.
Base class for those render states which have only one binding point (the vast majority).
void eraseEnable(EEnable en)
void eraseUniform(Uniform *unif)
void addChild(ShaderNode *node)
void eraseChild(ShaderNode *node)
UniformsMap mUniforms_Final
void eraseAllRenderStates()
ref< RenderState > mRenderState
const UniformsMap & uniforms() const
Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects...
const ShaderNode * parent() const
Does not propagates to children (thus cannot override children settings); cannot be overridden...
EEnable
Constant that enable/disable a specific OpenGL feature, see also Shader, Shader::enable(), Shader::disable(), Shader::isEnabled()
EnableInfo(EEnable en=EN_UnknownEnable, bool on=false, EInheritance inheritance=IN_Propagate)
void setShader(Shader *shader)
The ref<> class is used to reference-count an Object.
virtual ERenderState type() const
void setRenderState(EInheritance inheritance, RenderStateNonIndexed *rs)
RenderStatesMap mRenderStates_Final
void setRenderState(EInheritance inheritance, RenderState *rs, int index)
EInheritance mInheritance
void setUniform(Uniform *uniform)
Equivalent to gocUniformSet()->setUniform(...)
EnablesMap mEnables_Final
Visualization Library's enums in the 'vl' namespace.
void enable(EEnable capability)
void setUniform(Uniform *unif, EInheritance inheritance=IN_Propagate)
void setEnable(EEnable en, bool on, EInheritance inheritance=IN_Propagate)
void eraseRenderState(RenderStateNonIndexed *rs)
RenderStateInfo(EInheritance inheritance=IN_Propagate, RenderState *rs=NULL, int index=-1)