fixed terrain tiles generation
[demo] / src / opengl / mesh-gl.cc
index f0956b4..dd73bf3 100644 (file)
@@ -73,6 +73,9 @@ MeshGL::~MeshGL()
 
 void MeshGL::draw() const
 {
+       if(!vdata_valid) {
+               ((MeshGL*)this)->update_vertex_data();
+       }
        glBindVertexArray(vao);
 
        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo);