From: Daniel Karbach Date: Wed, 27 May 2015 14:28:43 +0000 (+0200) Subject: remove unneccessary buffer binds before draw calls X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=d01ca2cb76681d7795bb4b483d7033b86410725a;p=blank.git remove unneccessary buffer binds before draw calls --- 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