From d01ca2cb76681d7795bb4b483d7033b86410725a Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Wed, 27 May 2015 16:28:43 +0200 Subject: [PATCH] remove unneccessary buffer binds before draw calls --- src/model.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/model.cpp b/src/model.cpp index 62a90e5..1d4edef 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -93,7 +93,6 @@ void Model::Update(const Buffer &buf) { void Model::Draw() const { glBindVertexArray(va); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, handle[ATTRIB_INDEX]); glDrawElements( GL_TRIANGLES, // how count, // count @@ -191,7 +190,6 @@ void BlockModel::Update(const Buffer &buf) { void BlockModel::Draw() const { glBindVertexArray(va); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, handle[ATTRIB_INDEX]); glDrawElements( GL_TRIANGLES, // how count, // count @@ -279,7 +277,6 @@ void OutlineModel::Draw() { glEnable(GL_LINE_SMOOTH); glLineWidth(2.0f); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, handle[ATTRIB_INDEX]); glDrawElements( GL_LINES, // how indices.size(), // count -- 2.39.2