Bbop-2D 0.4.1-alpha
Bbop-2D is a c++ library based on openGL to make 2D game. It implement sprite, shape, light and more.
Loading...
Searching...
No Matches
VBO.h
Go to the documentation of this file.
1/*
2 * VBO.h
3 *
4 * Ce programme est distribué sous les termes de la Licence Publique
5 * Générale GNU, version 3.0, telle que publiée par la Free Software
6 * Foundation. Consultez la Licence Publique Générale GNU pour plus de
7 * détails.
8 *
9 * Vous devez avoir reçu une copie de la Licence Publique Générale GNU
10 * en même temps que ce programme. Si ce n'est pas le cas, consultez
11 * <https://www.gnu.org/licenses/>.
12 */
13
14#ifndef VBO_CLASS_H
15#define VBO_CLASS_H
16
17#include <GL/glew.h>
18#include <GLFW/glfw3.h>
19
20class VBO
21{
22 public:
23 // Reference ID of the Vertex Buffer Object
24 GLuint ID;
25 // Constructor that generates a Vertex Buffer Object and links it to vertices
26 VBO(GLfloat *vertices, GLsizeiptr size, GLenum typeVBO);
27 VBO();
28
29 void init(GLfloat *vertices, GLsizeiptr size, GLenum typeVBO);
30
31 // Binds the VBO
32 void Bind() const;
33 // Unbinds the VBO
34 void Unbind();
35 // Deletes the VBO
36 void Delete();
37 // change data of VBO
38 void update(GLfloat *vertices, GLsizeiptr size);
39};
40
41#endif
Definition VBO.h:21
GLuint ID
Definition VBO.h:24
void init(GLfloat *vertices, GLsizeiptr size, GLenum typeVBO)
Definition VBO.cpp:28
void Unbind()
Definition VBO.cpp:38
void Bind() const
Definition VBO.cpp:35
void Delete()
Definition VBO.cpp:41
void update(GLfloat *vertices, GLsizeiptr size)
Definition VBO.cpp:43
VBO()
Definition VBO.cpp:26