# Visualization Library

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

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

# vl::Renderer Class Reference

The Renderer class executes the actual rendering on the given RenderQueue. More...

`#include <Renderer.hpp>`

Inheritance diagram for vl::Renderer:

List of all members.

## Public Member Functions

virtual const char * | className ()
| Returns the name of the class.
| Renderer ()
virtual | ~Renderer ()
virtual void | render (const RenderQueue *render_queue, Camera *camera)
void | setCollectStatistics (bool on)
bool | collectStatistics () const
int | renderedRenderablesCount () const
int | renderedTrianglesCount () const
int | renderedLinesCount () const
int | renderedPointsCount () const
void | applyEnables (const EnableSet *prev, const EnableSet *cur)
void | applyRenderStates (const RenderStateSet *prev, const RenderStateSet *cur, const Camera *camera)
const OpenGLContext * | openglContext () const
void | setOpenGLContext (const OpenGLContext *ogl_context)
void | resetEnables ()
void | resetRenderStates ()
void | setOcclusionCullingEnabled (bool enabled)
| Whether occlusion culling is enabled or not.
bool | occlusionCullingEnabled () const
| Whether occlusion culling is enabled or not.
void | setOcclusionThreshold (int threshold)
| The number of pixels visible for an actor to be considered occluded (default = 0).
int | occlusionThreshold () const
| The number of pixels visible for an actor to be considered occluded (default = 0).

## Protected Member Functions

void | setupDefaultRenderStates ()

## Protected Attributes

bool | mCollectStatistics
int | mRenderedRenderableCount
int | mRenderedTriangleCount
int | mRenderedLineCount
int | mRenderedPointCount
int | mEnableTable [EN_EnableCount]
int | mRenderStateTable [RS_COUNT]
bool | mCurrentEnable [EN_EnableCount]
const RenderState * | mCurrentRenderState [RS_COUNT]
std::map< String, Uniform * > | mCurrentUniform
const RenderState * | mDefaultRenderStates [RS_COUNT]
const OpenGLContext * | mOpenGLContext
bool | mOcclusionCullingEnabled
ref< Shader > | mOcclusionShader
int | mOcclusionThreshold
unsigned | mOcclusionQueryTick
unsigned | mOcclusionQueryTickPrev

## Detailed Description

The Renderer class executes the actual rendering on the given RenderQueue.

See also:
  Rendering

## Constructor & Destructor Documentation

Renderer::Renderer | ( |  | ) |

virtual vl::Renderer::~Renderer | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::Object.

Reimplemented in vl::EdgeRenderer.

void Renderer::render | ( | const RenderQueue * | render_queue,
|  | Camera * | camera |
| ) |  |  | `[virtual]`

Reimplemented in vl::EdgeRenderer.

void vl::Renderer::setCollectStatistics | ( | bool | on | ) | `[inline]`

bool vl::Renderer::collectStatistics | ( |  | ) | const`[inline]`

int vl::Renderer::renderedRenderablesCount | ( |  | ) | const`[inline]`

int vl::Renderer::renderedTrianglesCount | ( |  | ) | const`[inline]`

int vl::Renderer::renderedLinesCount | ( |  | ) | const`[inline]`

int vl::Renderer::renderedPointsCount | ( |  | ) | const`[inline]`

void Renderer::applyEnables | ( | const EnableSet * | prev,
|  | const EnableSet * | cur |
| ) |  |  |

void Renderer::applyRenderStates | ( | const RenderStateSet * | prev,
|  | const RenderStateSet * | cur,
|  | const Camera * | camera |
| ) |  |  |

const OpenGLContext* vl::Renderer::openglContext | ( |  | ) | const`[inline]`

void vl::Renderer::setOpenGLContext | ( | const OpenGLContext * | ogl_context | ) | `[inline]`

void Renderer::resetEnables | ( |  | ) |

void Renderer::resetRenderStates | ( |  | ) |

void vl::Renderer::setOcclusionCullingEnabled | ( | bool | enabled | ) | `[inline]`

Whether occlusion culling is enabled or not.

See also OpenGL-Accelerated Occlusion Culling Tutorial.

bool vl::Renderer::occlusionCullingEnabled | ( |  | ) | const`[inline]`

Whether occlusion culling is enabled or not.

See also OpenGL-Accelerated Occlusion Culling Tutorial.

void vl::Renderer::setOcclusionThreshold | ( | int | threshold | ) | `[inline]`

The number of pixels visible for an actor to be considered occluded (default = 0).

int vl::Renderer::occlusionThreshold | ( |  | ) | const`[inline]`

The number of pixels visible for an actor to be considered occluded (default = 0).

void Renderer::setupDefaultRenderStates | ( |  | ) | `[protected]`

## Member Data Documentation

bool vl::Renderer::mCollectStatistics`[protected]`

int vl::Renderer::mRenderedRenderableCount`[protected]`

int vl::Renderer::mRenderedTriangleCount`[protected]`

int vl::Renderer::mRenderedLineCount`[protected]`

int vl::Renderer::mRenderedPointCount`[protected]`

int vl::Renderer::mEnableTable[EN_EnableCount]`[protected]`

int vl::Renderer::mRenderStateTable[RS_COUNT]`[protected]`

bool vl::Renderer::mCurrentEnable[EN_EnableCount]`[protected]`

const RenderState* vl::Renderer::mCurrentRenderState[RS_COUNT]`[protected]`

std::map< String, Uniform* > vl::Renderer::mCurrentUniform`[protected]`

const RenderState* vl::Renderer::mDefaultRenderStates[RS_COUNT]`[protected]`

const OpenGLContext* vl::Renderer::mOpenGLContext`[protected]`

bool vl::Renderer::mOcclusionCullingEnabled`[protected]`

ref<Shader> vl::Renderer::mOcclusionShader`[protected]`

int vl::Renderer::mOcclusionThreshold`[protected]`

unsigned vl::Renderer::mOcclusionQueryTick`[protected]`

unsigned vl::Renderer::mOcclusionQueryTickPrev`[protected]`

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

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

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