#include <vertexBuffer.h>
Public Types |
|
typedef GLuint | Buffer [4] |
Public Member Functions |
|
MeshBuffer (const MeshBuffer &mesh_buffer) | |
const MeshBuffer & | operator= (const MeshBuffer &buffer) |
const Mesh * | getMesh () |
Get the Mesh for this buffer object. |
|
void | setMesh (const Mesh &mesh) |
Set the Mesh which shall be drawn with this
buffer object. |
|
bool | initialize () |
Transfer all vertex, normal, index
and color data of the mesh into the vertex buffer
object. |
|
bool | draw () |
Draw the mesh from the
buffer. |
|
void | clear () |
Unset the mesh pointer and clear the
buffer. |
|
void | clearBuffer () |
Free the reserved (and filled)
vertex buffer. |
|
bool | isBusy () const |
Return true, if currently updateing
or drawing. |
|
Static Public Member Functions |
|
static bool | initGL () |
Initialise the GL needed methods.
|
|
static void | setGLRenderer (GLRenderer *renderer) |
Set the GLRender. |
|
Protected Attributes |
|
const Mesh * | mesh_ |
Buffer | buffer_ |
bool | filled_ |
bool | busy_ |
bool | multiple_colors_ |
ColorRGBA | color_ |
Size | vertices_ |
Size | triangles_ |
Static Protected Attributes |
|
static GLRenderer * | gl_renderer_ |
Vertex Buffer Objects are an OpenGL extension available since OpenGL version 1.5.
static bool BALL::VIEW::MeshBuffer::initGL | ( | ) | [static] |
Initialise the GL needed methods.
Call this method one time after having a valid GL context (e.g. in GLRenderer::init).
static void BALL::VIEW::MeshBuffer::setGLRenderer | ( | GLRenderer * | renderer | ) | [static] |
Set the GLRender.
This GLRender pointer is used to know if to draw the mesh transparent solid or transparent, as solid triangles or as points. Meshes can currently not drawn in wireframe mode with vertex buffer.