# Visualization Library

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

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

Public Member Functions | Protected Attributes

# vl::RenderStateSet Class Reference

A set of RenderState objects managed by a Shader. More...

`#include <RenderStateSet.hpp>`

Inheritance diagram for vl::RenderStateSet:

List of all members.

## Public Member Functions

| RenderStateSet ()
RenderStateSet & | deepCopyFrom (const RenderStateSet &other)
RenderStateSet & | shallowCopyFrom (const RenderStateSet &other)
void | setRenderState (RenderState *renderstate, int index)
RenderState * | renderState (ERenderState type, int index=-1)
const RenderState * | renderState (ERenderState type, int index=-1) const
size_t | renderStatesCount () const
const RenderStateSlot * | renderStates () const
RenderStateSlot * | renderStates ()
void | eraseRenderState (ERenderState type, int index)
| If index == -1 all the renderstates of the given type are removed regardless of their binding index.
void | eraseAllRenderStates ()
const GLSLProgram * | glslProgram () const
| Returns the GLSLProgram associated to a RenderStateSet (if any)
GLSLProgram * | glslProgram ()
| Returns the GLSLProgram associated to a RenderStateSet (if any)

## Protected Attributes

std::vector< RenderStateSlot > | mRenderStates
GLSLProgram * | mGLSLProgram

## Detailed Description

A set of RenderState objects managed by a Shader.

See also:
  Shader, Effect, Actor

Definition at line 48 of file RenderStateSet.hpp.

## Constructor & Destructor Documentation

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

Definition at line 53 of file RenderStateSet.hpp.

References VL_DEBUG_SET_OBJECT_NAME.

## Member Function Documentation

RenderStateSet & RenderStateSet::deepCopyFrom | ( | const RenderStateSet & | other ) |

Definition at line 39 of file RenderStateSet.cpp.

References mRenderStates.

Referenced by vl::Shader::deepCopyFrom().

RenderStateSet& vl::RenderStateSet::shallowCopyFrom | ( | const RenderStateSet & | other ) | `[inline]`

Definition at line 60 of file RenderStateSet.hpp.

References mGLSLProgram, and mRenderStates.

Referenced by vl::Shader::shallowCopyFrom().

void RenderStateSet::setRenderState | ( | RenderState * | renderstate,
|  | int | index
| ) |  |

Definition at line 47 of file RenderStateSet.cpp.

References mGLSLProgram, mRenderStates, vl::RS_GLSLProgram, and vl::RenderState::type().

RenderState * RenderStateSet::renderState | ( | ERenderState | type,
|  | int | index = `-1`
| ) |  |

Definition at line 66 of file RenderStateSet.cpp.

References mRenderStates, and NULL.

Referenced by vl::Shader::getClipPlane(), vl::Shader::getGLSLProgram(), vl::Shader::getLight(), and vl::Shader::getVertexAttrib().

const RenderState * RenderStateSet::renderState | ( | ERenderState | type,
|  | int | index = `-1`
| ) |  | const

Definition at line 74 of file RenderStateSet.cpp.

References mRenderStates, and NULL.

size_t vl::RenderStateSet::renderStatesCount | ( | ) | const`[inline]`

Definition at line 70 of file RenderStateSet.hpp.

Referenced by vl::OpenGLContext::applyRenderStates(), vl::VLXClassWrapper_Shader::exportShader(), and vl::Rendering::fillRenderQueue().

const RenderStateSlot* vl::RenderStateSet::renderStates | ( | ) | const`[inline]`

Definition at line 72 of file RenderStateSet.hpp.

References NULL.

Referenced by vl::OpenGLContext::applyRenderStates(), vl::VLXClassWrapper_Shader::exportShader(), and vl::Rendering::fillRenderQueue().

RenderStateSlot* vl::RenderStateSet::renderStates | ( | ) | `[inline]`

Definition at line 74 of file RenderStateSet.hpp.

References NULL.

void RenderStateSet::eraseRenderState | ( | ERenderState | type,
|  | int | index
| ) |  |

If index == -1 all the renderstates of the given type are removed regardless of their binding index.

Definition at line 82 of file RenderStateSet.cpp.

References mGLSLProgram, mRenderStates, NULL, and vl::RS_GLSLProgram.

void vl::RenderStateSet::eraseAllRenderStates | ( | ) | `[inline]`

Definition at line 79 of file RenderStateSet.hpp.

References NULL.

const GLSLProgram* vl::RenderStateSet::glslProgram | ( | ) | const`[inline]`

Returns the GLSLProgram associated to a RenderStateSet (if any)

Definition at line 82 of file RenderStateSet.hpp.

Referenced by vl::Renderer::render().

GLSLProgram* vl::RenderStateSet::glslProgram | ( | ) | `[inline]`

Returns the GLSLProgram associated to a RenderStateSet (if any)

Definition at line 85 of file RenderStateSet.hpp.

## Member Data Documentation

std::vector< RenderStateSlot > vl::RenderStateSet::mRenderStates`[protected]`

Definition at line 88 of file RenderStateSet.hpp.

Referenced by deepCopyFrom(), eraseRenderState(), renderState(), setRenderState(), and shallowCopyFrom().

GLSLProgram* vl::RenderStateSet::mGLSLProgram`[protected]`

Definition at line 89 of file RenderStateSet.hpp.

Referenced by eraseRenderState(), setRenderState(), and shallowCopyFrom().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/RenderStateSet.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/RenderStateSet.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:49.
Permission is granted to use this page to write and publish articles regarding Visualization Library.