GLIP-Lib
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HdlVBO.hpp
Go to the documentation of this file.
1 /* ************************************************************************************************************* */
2 /* */
3 /* GLIP-LIB */
4 /* OpenGL Image Processing LIBrary */
5 /* */
6 /* Author : R. Kerviche */
7 /* LICENSE : MIT License */
8 /* Website : glip-lib.net */
9 /* */
10 /* File : HdlVBO.hpp */
11 /* Original Date : August 7th 2010 */
12 /* */
13 /* Description : OpenGL Vertex Buffer Object Handle */
14 /* */
15 /* ************************************************************************************************************* */
16 
24 #ifndef __HDLVBO_INCLUDE__
25 #define __HDLVBO_INCLUDE__
26 
27  // GL include
28  #include "Core/LibTools.hpp"
29  #include "Core/OglInclude.hpp"
30  #include "Core/HdlGeBO.hpp"
31 
32  namespace Glip
33  {
34  namespace CoreGL
35  {
36  // Vertex Buffer Object Handle
41  class GLIP_API HdlVBO
42  {
43  private :
44  int nVert,
45  nElements,
46  dim,
47  nIndPerElement,
48  dimTexCoords;
49  bool hasNormals;
50  HdlGeBO *vertices,
51  *elements;
52  GLintptr offsetVertices,
53  offsetNormals,
54  offsetTexCoords;
55  GLenum type;
56 
57  public :
58  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);
59  ~HdlVBO(void);
60 
61  int getVerticesCount(void);
62  int getShapeDimension(void);
63  int getElementsCount(void);
64  GLenum getType(void);
65  void draw(void);
66 
67  static void unbind(void);
68  static void unmap(void);
69  };
70  }
71  }
72 
73 #endif
74 
Specific defines for the API structure.
Object handle for OpenGL Vertex Buffer Objects.
Definition: HdlVBO.hpp:41
Definition: Component.hpp:32
Object handle for OpenGL Buffer Object (VBO, PBO, VAO, ...).
Definition: HdlGeBO.hpp:40
OpenGL Generic handle for Buffer Objects (VBO, PBO, VAO, ...)
OpenGL includes and tools.