buffer allocation
[demo] / src / opengl / mesh-gl.h
index 912257c..ca4c058 100644 (file)
@@ -9,11 +9,19 @@ private:
 
        unsigned int vbo_vertices;
        unsigned int vbo_normals;
+       unsigned int vbo_tex_coords;
+
        unsigned int ibo;
 
        int num_vertices;
        int num_indices;
 
+       void update_vbo();
+
+       /* used by draw_normals to debug stuff: */
+       mutable unsigned int nvao;
+       mutable unsigned int nvbo;
+
 public:
        MeshGL();
        MeshGL(const MeshGL &mesh);
@@ -21,10 +29,10 @@ public:
 
        virtual ~MeshGL();
 
-       // virtual void draw() const override;
-       virtual void update_vertex_data() override;
+       virtual void draw() const override;
+       virtual void draw_normals(float scale) const override;
+       virtual bool update_vertex_data() override;
 
-       void update_vbo();
        void destroy_vbo();
 };