buffer allocation
[demo] / src / opengl / mesh-gl.cc
index 6175aae..531ac78 100644 (file)
@@ -69,6 +69,8 @@ MeshGL::~MeshGL()
 
        vertices.clear();
        normals.clear();
+       tex_coords.clear();
+       indices.clear();
 }
 
 void MeshGL::draw() const
@@ -115,9 +117,10 @@ void MeshGL::draw_normals(float scale) const
        glBindVertexArray(0);
 }
 
-void MeshGL::update_vertex_data()
+bool MeshGL::update_vertex_data()
 {
        update_vbo();
+       return true;
 }
 
 void MeshGL::update_vbo()
@@ -211,4 +214,4 @@ void MeshGL::destroy_vbo()
                glDeleteBuffers(1, &nvbo);
        if(nvao)
                glDeleteVertexArrays(1, &nvao);
-}
\ No newline at end of file
+}