From 14192fa40fd2bc9e69ddec7518525b918d9ecaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 22 Oct 2012 19:42:12 +0200 Subject: [PATCH] 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. --- src/Buffer.h | 2 ++ src/Mesh.cpp | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Buffer.h b/src/Buffer.h index 93ff82dd9..6df02acad 100644 --- a/src/Buffer.h +++ b/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); } diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 719fc4b79..1fad6de36 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -162,9 +162,7 @@ void Mesh::unbindImplementationDefault() { } #ifndef MAGNUM_TARGET_GLES -void Mesh::unbindImplementationVAO() { - bindVAO(0); -} +void Mesh::unbindImplementationVAO() {} #endif }