Buffer Class Reference

An abstract class that defines the interface for the additional buffers of Group. More...

Inheritance diagram for Buffer:
ArrayBuffer< T > IRRBuffer

List of all members.

Public Member Functions

unsigned int getFlag () const
 Gets the current flag of this buffer.
bool isSwapEnabled () const
 Tells whether data is swapped as particles in the group are swapped.

Detailed Description

An abstract class that defines the interface for the additional buffers of Group.

A buffer allows a Group to hold additional data.
Typically, they are used for rendering as the GPU or the rendering engine needs data to be organized in a specific way.

Their use can be extended to anything to store data within a group.
Buffers can also be swapped as particles are swap within a group. This allows to have the ordering of data consistent with the ordering of particles.
However, if the buffers are only used for temporary storage on a single frame (most of the renderers), it is not necessary to swap the data.

A buffer also contains a flag which is an unsigned integer that can be used to check the validity of the buffer from frame to frame.

Note that only a group can create and delete a buffer. The user can ask a group to create a new buffer by passing a BufferCreator object to it.
Check out the group interface about buffers for more info.

Since:
1.03.02

Definition at line 48 of file SPK_Buffer.h.


Member Function Documentation

unsigned int getFlag (  )  const

Gets the current flag of this buffer.

Returns:
the current flag of this buffer

Definition at line 120 of file SPK_Buffer.h.

bool isSwapEnabled (  )  const

Tells whether data is swapped as particles in the group are swapped.

Returns:
true if data must be swapped with particles, false if not

Definition at line 125 of file SPK_Buffer.h.


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