Mesh::~Mesh()
{
+ set_manager(0);
delete vbuf;
delete ibuf;
if(vao_id)
if(!current())
vertices.apply();
- Bind bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER);
+ BindRestore bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER);
Bind bind_winding(winding);
for(list<Batch>::const_iterator i=batches.begin(); i!=batches.end(); ++i)
glBindVertexArray(0);
}
-Resource::AsyncLoader *Mesh::load(IO::Seekable &io)
+Resource::AsyncLoader *Mesh::load(IO::Seekable &io, const Resources *)
{
return new AsyncLoader(*this, io);
}