VISH  0.2
Classes | Public Types | Public Member Functions
Wizt::Anemone Class Reference

Abstract object for elementary render objects. More...

#include </home/werner/origo/vish/ocean/Anemonia/Anemone.hpp>

List of all members.

Classes

Public Types

Public Member Functions


Detailed Description

Abstract object for elementary render objects.

The Anemone allows to attach basic components, "Tentacles", which cover a certain property of the rendering instance, such as vertex arrays. Once constructed, the Anemone provides a basic instance of a renderable objects. How it is actually done will depend on the implementation of the tentacles, which might be OpenGL, OpenGL-ES, WebGL or whatever. The concrete form of the Tentacles is deferred to another instance. The Anemone provides just management of those Tentacles.

Examples:

AnemoneBoundingVolume.cpp, and SeagrassBoundingVolume.cpp.


Member Enumeration Documentation

Types of tentacles that are attached at an Anemone.

The numerical value of these classes determines the order in which a Tentacle's activate()/deactivate() function is called. Smaller values come first, higher values come later. The possible tentacles used are not limited to the given enums, arbitrary user-defined values are supported as well. Having tentacles of same value is no problem as long as the order of their operations does not matter (i.e. is commutative).

Enumerator:
Timer 

Timer, measures execution time of this Anemone.

Status 

Status Flags (glEnable/glDisable)

Texture 

Textures.

Renderbuffer 

Renderbuffer objects.

Framebuffer 

Framebuffer objects.

Program 

Shader programs.

Variables 

Global shader variables (user-defined uniforms)

Vertex 

Vertex array buffers.

Element 

Element buffers.

Painter 

Calls to drawElements, performing the actual actions.

DisplayLists 

OpenGL Display lists (deprecated, should not be used)


Constructor & Destructor Documentation

Wizt::Anemone::Anemone ( const MemCore::WeakPtr< MemCore::Creature > &  theCreator = MemCore::NullPtr())

Constructor, optionally specify a Creator.

A Creator may be used to classify how to cache Anemones, since all Anemones related to the same type of Creators (their typeid) are clustered into the same pool of Anemones. If memory runs short, Anemones of the same creator type will be cleaned up first.


Member Function Documentation

RefPtr< Anemone::SpecializedTentacle< Anemone::Program > > Wizt::Anemone::getProgram ( ) const

Get the shader program that is stored in this Anemone.

Returns the first tentacle found to be of TentacleClass "Program".

bool Wizt::Anemone::insertTentacle ( int  TentacleOrder,
const MemCore::RefPtr< Tentacle > &  T 
)

Append a generic Tentacle to this Anemone Return false if there was no valid Tentacle given.

Note: could also just query the tentacle's size here.

int Wizt::Anemone::wave ( ) const

Let the Anemone display its full glory by activating all its Tentacles.

This call executes the tentacles stored in the Anemone and does the actual rendering.


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