GLQuadRenderer Class Reference

A Renderer drawing particles as OpenGL quads. More...

Inheritance diagram for GLQuadRenderer:
GLRenderer QuadRendererInterface Oriented3DRendererInterface GLExtHandler Renderer Registerable BufferHandler

List of all members.

Public Member Functions

 GLQuadRenderer (float scaleX=1.0f, float scaleY=1.0f)
 Constructor of GLQuadRenderer.
virtual bool setTexturingMode (TexturingMode mode)
 Sets the texturing mode for this GLQuadRenderer.
GLuint getTexture () const
 Gets the texture of this GLQuadRenderer.
virtual void createBuffers (const Group &group)
 Creates the buffers for this buffer handler in the given group.
virtual void destroyBuffers (const Group &group)
 Destroys the buffers for this buffer handler in the given group.
virtual void render (const Group &group)
 Renders a Group of particles.

Static Public Member Functions

static GLQuadRenderercreate (float scaleX=1.0f, float scaleY=1.0f)
 Creates and registers a new GLQuadRenderer.

Protected Member Functions

virtual bool checkBuffers (const Group &group)
 checks the buffers and prepare them

Detailed Description

A Renderer drawing particles as OpenGL quads.

the orientation of the quads depends on the orientation parameters set. This orientation is computed during rendering by the CPU (further improvement of SPARK will allow to make the computation on GPU side).

Below are the parameters of Particle that are used in this Renderer (others have no effects) :

Definition at line 56 of file SPK_GLQuadRenderer.h.


Constructor & Destructor Documentation

GLQuadRenderer ( float  scaleX = 1.0f,
float  scaleY = 1.0f 
)

Constructor of GLQuadRenderer.

Parameters:
scaleX the scale of the width of the quad
scaleY the scale of the height of the quad

Member Function Documentation

virtual bool checkBuffers ( const Group group  )  [protected, virtual]

checks the buffers and prepare them

This method has to be implemented in derived class that uses buffers.
true must be returned if the buffers are found and initialized, false otherwise.

Parameters:
group : the group in which to check the buffers
Returns:
true if buffers are ready, false otherwise

Reimplemented from BufferHandler.

GLQuadRenderer * create ( float  scaleX = 1.0f,
float  scaleY = 1.0f 
) [static]

Creates and registers a new GLQuadRenderer.

Parameters:
scaleX the scale of the width of the quad
scaleY the scale of the height of the quad
Returns:
A new registered GLQuadRenderer
Since:
1.04.00

Definition at line 152 of file SPK_GLQuadRenderer.h.

virtual void createBuffers ( const Group group  )  [virtual]

Creates the buffers for this buffer handler in the given group.

If the buffers for this type of buffer handler already exists within the Group, they are priorly destroyed.
The type of buffers created depends on the state of the buffer handler at the time this method is called.

This method has to be overridden in derived classes that use buffers

Parameters:
group : the Group in which to create the buffers for this buffer handler

Reimplemented from BufferHandler.

virtual void destroyBuffers ( const Group group  )  [virtual]

Destroys the buffers for this buffer handler in the given group.

if the buffers dont exist, nothing happens.

This method has to be overridden in derived classes that use buffers

Parameters:
group : the Group in which to destroy the buffers for this buffer handler

Reimplemented from BufferHandler.

GLuint getTexture (  )  const

Gets the texture of this GLQuadRenderer.

Returns:
the texture of this GLQuadRenderer

Definition at line 164 of file SPK_GLQuadRenderer.h.

virtual void render ( const Group group  )  [virtual]

Renders a Group of particles.

Parameters:
group : the Group to render

Implements Renderer.

virtual bool setTexturingMode ( TexturingMode  mode  )  [virtual]

Sets the texturing mode for this GLQuadRenderer.

The texturing mode defines whether or not to apply a texture and if so which type of texture to apply (2D,3D or atlas).

Note that the validity of the texturing mode depends on the rendering API below.
The method returns true if the rendering mode can be set, false if it cannot

Parameters:
mode : the texturing mode of this GLQuadRenderer
Returns:
true if the rendering mode can be set, false if it cannot

Reimplemented from QuadRendererInterface.


Generated on Wed Apr 27 21:09:27 2011 for SPARK Particle Engine by  doxygen 1.6.1