]> git.localhorst.tv Git - blank.git/commitdiff
remove unneccessary buffer binds before draw calls
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 27 May 2015 14:28:43 +0000 (16:28 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 27 May 2015 14:29:37 +0000 (16:29 +0200)
src/model.cpp

index 62a90e554837ee18cf2fa66552e66020a8e6e7c4..1d4edef0b17fea6ea45845c67a9b2333535f858e 100644 (file)
@@ -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