Browse Source

Mesh rework, part 6: don't rebind default VAO after draw call.

There are a few corner cases namely with binding element buffer, which
should be resolved as soon as possible.
pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
14192fa40f
  1. 2
      src/Buffer.h
  2. 4
      src/Mesh.cpp

2
src/Buffer.h

@ -321,6 +321,8 @@ class MAGNUM_EXPORT Buffer {
*
* @todo Allow binding to Target::ElementArray only if VAO is bound
* to avoid potential issues?
* @bug Binding to ElementArray if any VAO is active will corrupt the mesh
* @todo Don't allow user to bind buffers?
* @see @fn_gl{BindBuffer}
*/
inline void bind(Target target) { bind(target, _id); }

4
src/Mesh.cpp

@ -162,9 +162,7 @@ void Mesh::unbindImplementationDefault() {
}
#ifndef MAGNUM_TARGET_GLES
void Mesh::unbindImplementationVAO() {
bindVAO(0);
}
void Mesh::unbindImplementationVAO() {}
#endif
}

Loading…
Cancel
Save