# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::ShaderNode Class Reference

The ShaderNode class is used to conveniently manage complex hierarchies of Shader[s]. More...

`#include <ShaderNode.hpp>`

Inheritance diagram for vl::ShaderNode:

List of all members.

## Classes

class | EnableInfo
class | RenderStateInfo
class | UniformInfo

## Public Member Functions

virtual const char * | className ()
| Returns the name of the class.
| ShaderNode ()
void | addChild (ShaderNode *node)
void | eraseChild (ShaderNode *node)
void | eraseChild (unsigned index)
void | eraseChildren (unsigned start, unsigned count)
int | findChild (const ShaderNode *node) const
unsigned | childrenCount () const
ShaderNode * | child (unsigned i)
const ShaderNode * | child (unsigned i) const
ShaderNode * | parent ()
const ShaderNode * | parent () const
void | inherit (ShaderNode *parent)
void | setRenderState (RenderState *rs, EInheritance inheritance=IN_Propagate)
void | eraseRenderState (RenderState *rs)
void | setEnable (EEnable en, bool on, EInheritance inheritance=IN_Propagate)
void | eraseEnable (EEnable en)
void | setUniform (Uniform *unif, EInheritance inheritance=IN_Propagate)
void | eraseUniform (Uniform *unif)
void | setShader (Shader *shader)
const Shader * | shader () const
Shader * | shader ()
void | updateHierachy ()

## Protected Attributes

std::vector< ref< ShaderNode > > | mNodes
ShaderNode * | mParent
std::map< ERenderState, RenderStateInfo > | mRenderStates
std::map< EEnable, EnableInfo > | mEnables
std::map< std::string, UniformInfo > | mUniforms
std::map< ERenderState, RenderStateInfo > | mRenderStates_Final
std::map< EEnable, EnableInfo > | mEnables_Final
std::map< std::string, UniformInfo > | mUniforms_Final
ref< Shader > | mShader

## Detailed Description

The ShaderNode class is used to conveniently manage complex hierarchies of Shader[s].

## Constructor & Destructor Documentation

vl::ShaderNode::ShaderNode | ( |  | ) | `[inline]`

## Member Function Documentation

virtual const char* vl::ShaderNode::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::Object.

void vl::ShaderNode::addChild | ( | ShaderNode * | node | ) | `[inline]`

void vl::ShaderNode::eraseChild | ( | ShaderNode * | node | ) | `[inline]`

void vl::ShaderNode::eraseChild | ( | unsigned | index | ) | `[inline]`

void vl::ShaderNode::eraseChildren | ( | unsigned | start,
|  | unsigned | count |
| ) |  |  | `[inline]`

int vl::ShaderNode::findChild | ( | const ShaderNode * | node | ) | const`[inline]`

unsigned vl::ShaderNode::childrenCount | ( |  | ) | const`[inline]`

ShaderNode* vl::ShaderNode::child | ( | unsigned | i | ) | `[inline]`

const ShaderNode* vl::ShaderNode::child | ( | unsigned | i | ) | const`[inline]`

ShaderNode* vl::ShaderNode::parent | ( |  | ) | `[inline]`

const ShaderNode* vl::ShaderNode::parent | ( |  | ) | const`[inline]`

void vl::ShaderNode::inherit | ( | ShaderNode * | parent | ) | `[inline]`

void vl::ShaderNode::setRenderState | ( | RenderState * | rs,
|  | EInheritance | inheritance = `IN_Propagate` |
| ) |  |  | `[inline]`

void vl::ShaderNode::eraseRenderState | ( | RenderState * | rs | ) | `[inline]`

void vl::ShaderNode::setEnable | ( | EEnable | en,
|  | bool | on,
|  | EInheritance | inheritance = `IN_Propagate` |
| ) |  |  | `[inline]`

void vl::ShaderNode::eraseEnable | ( | EEnable | en | ) | `[inline]`

void vl::ShaderNode::setUniform | ( | Uniform * | unif,
|  | EInheritance | inheritance = `IN_Propagate` |
| ) |  |  | `[inline]`

void vl::ShaderNode::eraseUniform | ( | Uniform * | unif | ) | `[inline]`

void vl::ShaderNode::setShader | ( | Shader * | shader | ) | `[inline]`

const Shader* vl::ShaderNode::shader | ( |  | ) | const`[inline]`

Shader* vl::ShaderNode::shader | ( |  | ) | `[inline]`

void vl::ShaderNode::updateHierachy | ( |  | ) | `[inline]`

## Member Data Documentation

std::vector< ref< ShaderNode > > vl::ShaderNode::mNodes`[protected]`

ShaderNode* vl::ShaderNode::mParent`[protected]`

std::map< ERenderState, RenderStateInfo > vl::ShaderNode::mRenderStates`[protected]`

std::map< EEnable, EnableInfo> vl::ShaderNode::mEnables`[protected]`

std::map< std::string, UniformInfo > vl::ShaderNode::mUniforms`[protected]`

std::map< ERenderState, RenderStateInfo > vl::ShaderNode::mRenderStates_Final`[protected]`

std::map< EEnable, EnableInfo> vl::ShaderNode::mEnables_Final`[protected]`

std::map< std::string, UniformInfo > vl::ShaderNode::mUniforms_Final`[protected]`

ref<Shader> vl::ShaderNode::mShader`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/ShaderNode.hpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:42 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.