# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Renderable Class Reference

An abstract class that represents all the objects that can be rendered. More...

`#include <Renderable.hpp>`

Inheritance diagram for vl::Renderable:

List of all members.

## Public Member Functions
virtual const char * | className ()
| Returns the name of the class.
| Renderable ()
virtual | ~Renderable ()
virtual void | render (const Actor *actor, const OpenGLContext *, const Camera *camera) const =0
| Renders the Renderable.
long long | boundsUpdateTick () const
void | computeBounds ()
void | setBoundsDirty (bool dirty)
bool | boundsDirty () const
void | setBoundingBox (const AABB &aabb)
const AABB & | boundingBox () const
void | setBoundingSphere (const Sphere &sphere)
const Sphere & | boundingSphere () const
unsigned int | displayList () const
void | setDisplayList (unsigned int disp_list)
bool | displayListEnabled () const
void | setDisplayListEnabled (bool enabled)
bool | displayListDirty () const
void | setDisplayListDirty (bool dirty)
bool | vboEnabled () const
void | setVBOEnabled (bool enabled)
bool | vboDirty () const
void | setVBODirty (bool dirty)
virtual void | updateVBOs (bool)
| Uploads the data stored in the local buffers on the GPU memory.
virtual void | deleteVBOs ()
| Destroyes the VBO (VertexBufferObjects) associated to this Geometry attributes.
void | deleteDisplayList ()
void | compileDisplayList (Actor *act, OpenGLContext *glctx, Camera *camera)
virtual int | triangleCount () const
virtual int | lineCount () const
virtual int | pointCount () const
## Protected Member Functions
virtual void | computeBounds_Implementation ()=0

## Detailed Description

An abstract class that represents all the objects that can be rendered.

In order to render a Renderable you have to bind it to an Actor. An Actor glues together a Renderable, an Effect and eventually a Transform. Note that the same Renderable can be associated to more than one Actor.

See also:
  Actor, Effect, Transform, Geometry

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::Object.

Reimplemented in vl::BezierSurface, vl::Clear, vl::DrawPixels, vl::Geometry, and vl::Text.

virtual void vl::Renderable::render | ( | const Actor * | actor,
|  | const OpenGLContext * | ,
|  | const Camera * | camera |
| ) |  |  | const`[pure virtual]`

Renders the Renderable.

Implemented in vl::Clear, vl::DrawPixels, vl::Geometry, and vl::Text.

long long vl::Renderable::boundsUpdateTick | ( |  | ) | const`[inline]`

void vl::Renderable::computeBounds | ( |  | ) | `[inline]`

void vl::Renderable::setBoundsDirty | ( | bool | dirty | ) | `[inline]`

bool vl::Renderable::boundsDirty | ( |  | ) | const`[inline]`

void vl::Renderable::setBoundingBox | ( | const AABB & | aabb | ) | `[inline]`

const AABB& vl::Renderable::boundingBox | ( |  | ) | const`[inline]`

void vl::Renderable::setBoundingSphere | ( | const Sphere & | sphere | ) | `[inline]`

const Sphere& vl::Renderable::boundingSphere | ( |  | ) | const`[inline]`

unsigned int vl::Renderable::displayList | ( |  | ) | const`[inline]`

void vl::Renderable::setDisplayList | ( | unsigned int | disp_list | ) | `[inline]`

bool vl::Renderable::displayListEnabled | ( |  | ) | const`[inline]`

void vl::Renderable::setDisplayListEnabled | ( | bool | enabled | ) | `[inline]`

bool vl::Renderable::displayListDirty | ( |  | ) | const`[inline]`

void vl::Renderable::setDisplayListDirty | ( | bool | dirty | ) | `[inline]`

bool vl::Renderable::vboEnabled | ( |  | ) | const`[inline]`

void vl::Renderable::setVBOEnabled | ( | bool | enabled | ) | `[inline]`

bool vl::Renderable::vboDirty | ( |  | ) | const`[inline]`

void vl::Renderable::setVBODirty | ( | bool | dirty | ) | `[inline]`

virtual void vl::Renderable::updateVBOs | ( | bool |  | ) | `[inline, virtual]`

Uploads the data stored in the local buffers on the GPU memory.

If 'discard_local_data' is set to `true` the memory used by the local buffers is released.

Reimplemented in vl::Geometry.

virtual void vl::Renderable::deleteVBOs | ( |  | ) | `[inline, virtual]`

Destroyes the VBO (VertexBufferObjects) associated to this Geometry attributes.

If 'clear_primitives' all the VBOs associated the Primitives objects are also deleted.

Note:
  This function does not touch the local (non GPU) data stored in the buffers associated to the vertex attributes and Primitives.

Reimplemented in vl::Geometry.

void vl::Renderable::deleteDisplayList | ( |  | ) | `[inline]`

void vl::Renderable::compileDisplayList | ( | Actor * | act,
|  | OpenGLContext * | glctx,
|  | Camera * | camera |
| ) |  |  | `[inline]`

virtual int vl::Renderable::triangleCount | ( |  | ) | const`[inline, virtual]`

Reimplemented in vl::Geometry.

virtual int vl::Renderable::lineCount | ( |  | ) | const`[inline, virtual]`

Reimplemented in vl::Geometry.

virtual int vl::Renderable::pointCount | ( |  | ) | const`[inline, virtual]`

Reimplemented in vl::Geometry.

virtual void vl::Renderable::computeBounds_Implementation | ( |  | ) | `[protected, pure virtual]`

Implemented in vl::Clear, vl::DrawPixels, vl::Geometry, and vl::Text.

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

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

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:29:02 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.