#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"
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);
}
{
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);
}