From d20682f3e5b394b6132ce0428015a1dd1a179155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 23 Jan 2013 23:32:43 +0100 Subject: [PATCH] Mesh: don't allow specifying index data from client memory. --- src/Mesh.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 4cc89e5f2..ed361d67f 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -277,10 +277,7 @@ void Mesh::bindImplementationDefault() { #endif /* Bind index buffer, if the mesh is indexed */ - if(_indexCount) { - if(_indexBuffer) _indexBuffer->bind(Buffer::Target::ElementArray); - else Buffer::unbind(Buffer::Target::ElementArray); - } + if(_indexCount) indexBuffer->bind(Buffer::Target::ElementArray); } void Mesh::bindImplementationVAO() {