#include <msp/gl/extensions/arb_vertex_array_object.h>
#include <msp/gl/extensions/arb_vertex_attrib_binding.h>
#include <msp/gl/extensions/arb_vertex_buffer_object.h>
#include <msp/gl/extensions/arb_vertex_array_object.h>
#include <msp/gl/extensions/arb_vertex_attrib_binding.h>
#include <msp/gl/extensions/arb_vertex_buffer_object.h>
- update_vertex_array(direct);
+ update_vertex_array(*vertex_array, 0, 0, direct);
+
+ if(mask&INSTANCE_ARRAY)
+ {
+ if(inst_array)
+ update_vertex_array(*inst_array, 1, 1, direct);
+ }
- glVertexArrayVertexBuffer(id, 0, array->get_buffer()->get_id(), 0, stride);
+ {
+ glVertexArrayVertexBuffer(id, binding, array.get_buffer()->get_id(), 0, stride);
+ glVertexArrayBindingDivisor(id, binding, divisor);
+ }
glVertexArrayAttribFormat(id, t, 4, GL_UNSIGNED_BYTE, true, offset);
else
glVertexArrayAttribFormat(id, t, sz, GL_FLOAT, false, offset);
glVertexArrayAttribFormat(id, t, 4, GL_UNSIGNED_BYTE, true, offset);
else
glVertexArrayAttribFormat(id, t, sz, GL_FLOAT, false, offset);
glVertexAttribPointer(t, 4, GL_UNSIGNED_BYTE, true, stride, reinterpret_cast<unsigned char *>(offset));
else
glVertexAttribPointer(t, sz, GL_FLOAT, false, stride, reinterpret_cast<float *>(offset));
glVertexAttribPointer(t, 4, GL_UNSIGNED_BYTE, true, stride, reinterpret_cast<unsigned char *>(offset));
else
glVertexAttribPointer(t, sz, GL_FLOAT, false, stride, reinterpret_cast<float *>(offset));