BALL
1.4.79
|
#include <BALL/VIEW/RENDERING/vertexBuffer.h>
Public Types | |
typedef GLuint | Buffer [4] |
Public Member Functions | |
MeshBuffer () | |
MeshBuffer (const MeshBuffer &mesh_buffer) | |
virtual | ~MeshBuffer () |
const MeshBuffer & | operator= (const MeshBuffer &buffer) |
const Mesh * | getMesh () |
Get the Mesh for this buffer object. More... | |
void | setMesh (const Mesh &mesh) |
Set the Mesh which shall be drawn with this buffer object. More... | |
bool | initialize () |
Transfer all vertex, normal, index and color data of the mesh into the vertex buffer object. More... | |
bool | draw () |
Draw the mesh from the buffer. More... | |
void | clear () |
Unset the mesh pointer and clear the buffer. More... | |
void | clearBuffer () |
Free the reserved (and filled) vertex buffer. More... | |
bool | isBusy () const |
Return true, if currently updateing or drawing. More... | |
Static Public Member Functions | |
static bool | initGL () |
static void | setGLRenderer (GLRenderer *renderer) |
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_ |
Wrapper class to draw BALLView Mesh instances with OpenGL vertex buffer objects. Vertex Buffer Objects are an OpenGL extension available since OpenGL version 1.5.
Definition at line 40 of file vertexBuffer.h.
typedef GLuint BALL::VIEW::MeshBuffer::Buffer[4] |
Definition at line 46 of file vertexBuffer.h.
BALL::VIEW::MeshBuffer::MeshBuffer | ( | ) |
BALL::VIEW::MeshBuffer::MeshBuffer | ( | const MeshBuffer & | mesh_buffer | ) |
|
virtual |
void BALL::VIEW::MeshBuffer::clear | ( | ) |
Unset the mesh pointer and clear the buffer.
void BALL::VIEW::MeshBuffer::clearBuffer | ( | ) |
Free the reserved (and filled) vertex buffer.
bool BALL::VIEW::MeshBuffer::draw | ( | ) |
Draw the mesh from the buffer.
|
inline |
Get the Mesh for this buffer object.
Definition at line 66 of file vertexBuffer.h.
|
static |
Initialise the GL needed methods. Call this method one time after having a valid GL context (e.g. in GLRenderer::init).
bool BALL::VIEW::MeshBuffer::initialize | ( | ) |
Transfer all vertex, normal, index and color data of the mesh into the vertex buffer object.
|
inline |
Return true, if currently updateing or drawing.
Definition at line 84 of file vertexBuffer.h.
const MeshBuffer& BALL::VIEW::MeshBuffer::operator= | ( | const MeshBuffer & | buffer | ) |
|
inlinestatic |
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.
Definition at line 91 of file vertexBuffer.h.
|
inline |
Set the Mesh which shall be drawn with this buffer object.
Definition at line 69 of file vertexBuffer.h.
|
protected |
Definition at line 96 of file vertexBuffer.h.
|
protected |
Definition at line 99 of file vertexBuffer.h.
|
protected |
Definition at line 101 of file vertexBuffer.h.
|
protected |
Definition at line 97 of file vertexBuffer.h.
|
staticprotected |
Definition at line 98 of file vertexBuffer.h.
|
protected |
Definition at line 95 of file vertexBuffer.h.
|
protected |
Definition at line 100 of file vertexBuffer.h.
|
protected |
Definition at line 103 of file vertexBuffer.h.
|
protected |
Definition at line 102 of file vertexBuffer.h.