GLIP-Lib
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
Glip::CoreGL::HdlVBO Class Reference

Object handle for OpenGL Vertex Buffer Objects. More...

#include <HdlVBO.hpp>

Public Member Functions

 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 Public Member Functions

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);.
 

Detailed Description

Object handle for OpenGL Vertex Buffer Objects.

Constructor & Destructor Documentation

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
_nVertNumber of vertices.
_dimDimension of the space containing the vertices (2 or 3).
freqFrequency (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).
_verticesPointer to vertices data.
_nElementsNumber of elements.
_nIndPerElementNumber of index per elements (2, 3, 4...).
_elementsPointer to elements data.
_typeType 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).
_normalsPointer to the normals data (of the same dimension as the vertices).
_dimTexCoordsDimension per texel (2 or 3).
_texcoordsPointer to the texel coordiantes data.

Member Function Documentation

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: