refresh();
if(!current())
- {
vertices.apply();
- if(ibuf)
- ibuf->bind_to(ELEMENT_ARRAY_BUFFER);
- }
-
+ Bind bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER);
Bind bind_winding(winding);
for(list<Batch>::const_iterator i=batches.begin(); i!=batches.end(); ++i)
i->draw();
-
- if(!current() && ibuf)
- Buffer::unbind_from(ELEMENT_ARRAY_BUFFER);
}
void Mesh::draw(Renderer &renderer) const