Object handle for OpenGL Vertex Buffer Objects.
More...
#include <HdlVBO.hpp>
|
| HdlVBO (int _nVert, int _dim, GLenum freq, const GLfloat *_vertices, int _nElements=0, int _nIndPerElement=0, const GLuint *_elements=NULL, GLenum _type=GL_POINTS, const GLfloat *_normals=NULL, int _dimTexCoords=0, const GLfloat *_texcoords=NULL) |
| HdlVBO constructor. More...
|
|
int | getVerticesCount (void) |
|
int | getShapeDimension (void) |
|
int | getElementsCount (void) |
|
GLenum | getType (void) |
|
void | draw (void) |
| Draw the VBO according to its data.
|
|
|
static void | unbind (void) |
| Unbind all VBO targets (GL_ARRAY_BUFFER_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);.
|
|
static void | unmap (void) |
| Unmap all VBO targets (GL_ARRAY_BUFFER_ARB, GL_ELEMENT_ARRAY_BUFFER_ARB);.
|
|
Object handle for OpenGL Vertex Buffer Objects.
HdlVBO::HdlVBO |
( |
int |
_nVert, |
|
|
int |
_dim, |
|
|
GLenum |
freq, |
|
|
const GLfloat * |
_vertices, |
|
|
int |
_nElements = 0 , |
|
|
int |
_nIndPerElement = 0 , |
|
|
const GLuint * |
_elements = NULL , |
|
|
GLenum |
_type = GL_POINTS , |
|
|
const GLfloat * |
_normals = NULL , |
|
|
int |
_dimTexCoords = 0 , |
|
|
const GLfloat * |
_texcoords = NULL |
|
) |
| |
HdlVBO constructor.
- Parameters
-
_nVert | Number of vertices. |
_dim | Dimension of the space containing the vertices (2 or 3). |
freq | Frequency (GL_STATIC_DRAW_ARB, GL_STATIC_READ_ARB, GL_STATIC_COPY_ARB, GL_DYNAMIC_DRAW_ARB, GL_DYNAMIC_READ_ARB, GL_DYNAMIC_COPY_ARB, GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, GL_STREAM_COPY_ARB). |
_vertices | Pointer to vertices data. |
_nElements | Number of elements. |
_nIndPerElement | Number of index per elements (2, 3, 4...). |
_elements | Pointer to elements data. |
_type | Type of the elements (GL_POINTS, GL_LINE, GL_LINE_STRIP, GL_LINE_LOOP, GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_QUADS, GL_QUAD_STRIP, GL_POLYGON). |
_normals | Pointer to the normals data (of the same dimension as the vertices). |
_dimTexCoords | Dimension per texel (2 or 3). |
_texcoords | Pointer to the texel coordiantes data. |
int HdlVBO::getElementsCount |
( |
void |
| ) |
|
- Returns
- The number of elements.
int HdlVBO::getShapeDimension |
( |
void |
| ) |
|
- Returns
- The dimension of the space.
GLenum HdlVBO::getType |
( |
void |
| ) |
|
- Returns
- The type of the elements.
int HdlVBO::getVerticesCount |
( |
void |
| ) |
|
- Returns
- The number of vertices.
The documentation for this class was generated from the following files: