]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/batch.cpp
Remove the Bindable class
[libs/gl.git] / source / core / batch.cpp
index 68e232ba29de5447fd9050d27894000f2765e86f..51746b37178a6345ca3e3ff1982a6bcdf7333e88 100644 (file)
@@ -1,7 +1,6 @@
 #include <msp/gl/extensions/arb_draw_instanced.h>
 #include <msp/gl/extensions/msp_primitive_restart.h>
 #include "batch.h"
-#include "bindable.h"
 #include "buffer.h"
 #include "error.h"
 #include "mesh.h"
@@ -188,9 +187,7 @@ unsigned Batch::get_index(unsigned i) const
 
 void Batch::draw() const
 {
-       BindRestore _bind_ibuf(get_buffer(), ELEMENT_ARRAY_BUFFER);
        const void *data_ptr = setup_draw();
-
        glDrawElements(prim_type, size(), gl_index_type, data_ptr);
 }
 
@@ -198,9 +195,7 @@ void Batch::draw_instanced(unsigned count) const
 {
        static Require req(ARB_draw_instanced);
 
-       BindRestore _bind_ibuf(get_buffer(), ELEMENT_ARRAY_BUFFER);
        const void *data_ptr = setup_draw();
-
        glDrawElementsInstanced(prim_type, size(), gl_index_type, data_ptr, count);
 }