quick backup of the renderer - things missing
[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 public:
20         MeshGL();
21         MeshGL(const MeshGL &mesh);
22         MeshGL& operator=(const MeshGL &mesh);
23
24         virtual ~MeshGL();
25
26         virtual void draw() const override;
27         virtual void update_vertex_data() override;
28
29         void update_vbo();
30         void destroy_vbo();
31 };
32
33 #endif // MESH_GL_H_