- for(const PipelineState::BoundUniformBlock &u: self->uniform_blocks)
- if(u.changed || mask==~0U)
- {
- if(u.block)
- {
- if(u.binding>=0)
- {
- glBindBufferRange(GL_UNIFORM_BUFFER, u.binding, u.block->get_buffer()->id, u.block->get_offset(), u.block->get_data_size());
- bound_uniform_blocks[u.binding] = 1;
- }
- else if(self->shprog)
- {
- const char *data = static_cast<const char *>(u.block->get_data_pointer());
- for(const Program::UniformCall &call: self->shprog->uniform_calls)
- call.func(call.location, call.size, data+call.location*16);
- }
- }
+ const VertexSetup *vertex_setup = self->vertex_setup;
+ glBindVertexArray(vertex_setup ? vertex_setup->id : 0);
+ if(vertex_setup)
+ {
+ static Require _req(MSP_primitive_restart);