BufferHandler Class Reference

A base interface that allows manipulation on Buffer. More...

Inheritance diagram for BufferHandler:
Modifier Renderer Collision Destroyer LinearForce ModifierGroup Obstacle PointMass Rotator Vortex GLRenderer IRRRenderer SFMLRenderer

List of all members.

Public Member Functions

virtual ~BufferHandler ()
 Destructor of BufferHandler.
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.

Static Public Member Functions

static void enableBuffersCreation (bool creation)
 Enables or disables the automatic buffers creation in a static way.
static bool isBuffersCreationEnabled ()
 Tells whether the automatic buffers creation is enabled or not.

Protected Member Functions

bool prepareBuffers (const Group &group)
 prepares the buffers of the given Group for processing
virtual bool checkBuffers (const Group &group)
 checks the buffers and prepare them

Detailed Description

A base interface that allows manipulation on Buffer.

Since:
1.04.00

Definition at line 38 of file SPK_BufferHandler.h.


Constructor & Destructor Documentation

virtual ~BufferHandler (  )  [virtual]

Destructor of BufferHandler.

Definition at line 47 of file SPK_BufferHandler.h.


Member Function Documentation

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 in ModifierGroup, IRRRenderer, GLLineRenderer, GLLineTrailRenderer, GLQuadRenderer, SFMLLineRenderer, SFMLPointRenderer, and SFMLQuadRenderer.

Definition at line 140 of file SPK_BufferHandler.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 in ModifierGroup, IRRLineRenderer, IRRPointRenderer, IRRQuadRenderer, GLLineRenderer, GLLineTrailRenderer, GLQuadRenderer, SFMLLineRenderer, SFMLPointRenderer, and SFMLQuadRenderer.

Definition at line 86 of file SPK_BufferHandler.h.

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 in ModifierGroup, IRRRenderer, GLLineRenderer, GLLineTrailRenderer, GLQuadRenderer, SFMLLineRenderer, SFMLPointRenderer, and SFMLQuadRenderer.

Definition at line 97 of file SPK_BufferHandler.h.

static void enableBuffersCreation ( bool  creation  )  [static]

Enables or disables the automatic buffers creation in a static way.

By default, the buffers creation is enabled.

Parameters:
creation : true to enable the buffers creation, false to disable it
static bool isBuffersCreationEnabled (  )  [static]

Tells whether the automatic buffers creation is enabled or not.

Returns:
true if the buffers creation is enabled, false if it is disabled
bool prepareBuffers ( const Group group  )  [protected]

prepares the buffers of the given Group for processing

Internally, this methods perfoms the following operations :


 if check buffers is false
	if buffers creation is enabled
		destroy buffers
		create buffers
		return true
	else return false
 else return true
 
Parameters:
group : the group whose buffers must be prepared
Returns:
true if the buffers are ready, false if not

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