BALL::VIEW::MeshBuffer Class Reference
[Renderer]
#include <BALL/VIEW/RENDERING/vertexBuffer.h>
List of all members.
Detailed Description
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.
- See http://oss.sgi.com/projects/ogl-sample/registry/EXT/pixel_buffer_object.txt
- Vertex Buffer Objects can drasticaly increase drawing speed for triangulated surfaces (up to 5 fold) compared with OpenGL display lists. To ensure a maximum of platform independence we use method pointers in the source file. These must be initialised by calling MeshBuffer::initGL() (See below).
Member Typedef Documentation
Constructor & Destructor Documentation
BALL::VIEW::MeshBuffer::MeshBuffer |
( |
|
) |
|
BALL::VIEW::MeshBuffer::MeshBuffer |
( |
const MeshBuffer & |
mesh_buffer |
) |
|
virtual BALL::VIEW::MeshBuffer::~MeshBuffer |
( |
|
) |
[virtual] |
Member Function Documentation
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.
const Mesh* BALL::VIEW::MeshBuffer::getMesh |
( |
|
) |
[inline] |
Get the Mesh for this buffer object.
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).
bool BALL::VIEW::MeshBuffer::initialize |
( |
|
) |
|
Transfer all vertex, normal, index and color data of the mesh into the vertex buffer object.
bool BALL::VIEW::MeshBuffer::isBusy |
( |
|
) |
const [inline] |
Return true, if currently updateing or drawing.
static void BALL::VIEW::MeshBuffer::setGLRenderer |
( |
GLRenderer * |
renderer |
) |
[inline, 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.
void BALL::VIEW::MeshBuffer::setMesh |
( |
const Mesh & |
mesh |
) |
[inline] |
Set the Mesh which shall be drawn with this buffer object.
Member Data Documentation