quick backup
[demo] / src / opengl / mesh-gl.h
1 #ifndef MESH_GL_H_
2 #define MESH_GL_H_
3
4 #include "mesh.h"
5
6 class MeshGL : public Mesh {
7 private:
8         unsigned int vao;
9
10         unsigned int vbo_vertices;
11         unsigned int vbo_normals;
12         unsigned int vbo_tex_coords;
13
14         unsigned int ibo;
15
16         int num_vertices;
17         int num_indices;
18
19         void update_vbo();
20
21 public:
22         MeshGL();
23         MeshGL(const MeshGL &mesh);
24         MeshGL& operator=(const MeshGL &mesh);
25
26         virtual ~MeshGL();
27
28         virtual void draw() const override;
29         virtual void update_vertex_data() override;
30
31         void destroy_vbo();
32 };
33
34 #endif // MESH_GL_H_