- bool legacy_bindings = (!state->shprog || state->shprog->uses_legacy_variables());
- if(state->mesh && legacy_bindings)
- {
- if(const Buffer *ibuf = state->mesh->get_index_buffer())
- ibuf->bind_to(ELEMENT_ARRAY_BUFFER);
- else
- Buffer::unbind_from(ELEMENT_ARRAY_BUFFER);
- }
-