A base interface that allows manipulation on Buffer. More...
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 |
A base interface that allows manipulation on Buffer.
Definition at line 38 of file SPK_BufferHandler.h.
virtual ~BufferHandler | ( | ) | [virtual] |
Destructor of BufferHandler.
Definition at line 47 of file SPK_BufferHandler.h.
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.
group | : the group in which to check the buffers |
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
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
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.
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.
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
group | : the group whose buffers must be prepared |