projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
added IBR lighting from irradiance maps
[demo]
/
src
/
opengl
/
mesh-gl.cc
diff --git
a/src/opengl/mesh-gl.cc
b/src/opengl/mesh-gl.cc
index
f0956b4
..
dd73bf3
100644
(file)
--- a/
src/opengl/mesh-gl.cc
+++ b/
src/opengl/mesh-gl.cc
@@
-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);