X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmesh.cpp;h=8f7c517b2b5360a57d69bded3aed38d32b9ab58c;hb=574abfb;hp=d1cb77f143c7a1ede2e5873fc1a21bb6c331d568;hpb=26ff1dd4c645c9b8b5361f5f37c58f071789f026;p=libs%2Fgl.git diff --git a/source/mesh.cpp b/source/mesh.cpp index d1cb77f1..8f7c517b 100644 --- a/source/mesh.cpp +++ b/source/mesh.cpp @@ -153,7 +153,7 @@ void Mesh::draw() const if(!current()) vertices.apply(); - Bind bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER); + BindRestore bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER); Bind bind_winding(winding); for(list::const_iterator i=batches.begin(); i!=batches.end(); ++i) @@ -170,7 +170,6 @@ void Mesh::draw(Renderer &renderer) const } renderer.set_mesh(this); - renderer.set_element_buffer(ibuf); renderer.set_winding_test(winding); for(list::const_iterator i=batches.begin(); i!=batches.end(); ++i) @@ -201,7 +200,7 @@ void Mesh::unbind() glBindVertexArray(0); } -Resource::AsyncLoader *Mesh::load(IO::Seekable &io) +Resource::AsyncLoader *Mesh::load(IO::Seekable &io, const Resources *) { return new AsyncLoader(*this, io); }