projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
buffer allocation
[demo]
/
src
/
opengl
/
mesh-gl.cc
diff --git
a/src/opengl/mesh-gl.cc
b/src/opengl/mesh-gl.cc
index
6175aae
..
531ac78
100644
(file)
--- a/
src/opengl/mesh-gl.cc
+++ b/
src/opengl/mesh-gl.cc
@@
-69,6
+69,8
@@
MeshGL::~MeshGL()
vertices.clear();
normals.clear();
vertices.clear();
normals.clear();
+ tex_coords.clear();
+ indices.clear();
}
void MeshGL::draw() const
}
void MeshGL::draw() const
@@
-115,9
+117,10
@@
void MeshGL::draw_normals(float scale) const
glBindVertexArray(0);
}
glBindVertexArray(0);
}
-void MeshGL::update_vertex_data()
+bool MeshGL::update_vertex_data()
{
update_vbo();
{
update_vbo();
+ return true;
}
void MeshGL::update_vbo()
}
void MeshGL::update_vbo()
@@
-211,4
+214,4
@@
void MeshGL::destroy_vbo()
glDeleteBuffers(1, &nvbo);
if(nvao)
glDeleteVertexArrays(1, &nvao);
glDeleteBuffers(1, &nvbo);
if(nvao)
glDeleteVertexArrays(1, &nvao);
-}
\ No newline at end of file
+}