]> git.tdb.fi Git - libs/gl.git/commit
Simplify VAO setup code
authorMikko Rasa <tdb@tdb.fi>
Sun, 22 Dec 2013 00:15:06 +0000 (02:15 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 22 Dec 2013 00:21:56 +0000 (02:21 +0200)
commit126ac7ca4053b765eab1473d2865bce728ef2428
tree3f17760aea57d722cb5254493af175a5ff2a1a4f
parent55f24c84b7270e117615b212665f17d64771cede
Simplify VAO setup code

Previously buffer binding semantics caused complications, as index buffer
was unbound while a mesh was bound so batches couldn't be updated.  Now
that buffers behave better with bounds meshes, batches can take care of
themselves again.

Triggering the setup from bind() instead of draw() gets rid of another
bunch of complications, since it will only be called when the VAO is going
to be actually used.
source/mesh.cpp
source/mesh.h