]> git.tdb.fi Git - libs/gl.git/blobdiff - source/mesh.cpp
Give meshes a higher priority when loading
[libs/gl.git] / source / mesh.cpp
index d1cb77f143c7a1ede2e5873fc1a21bb6c331d568..8f7c517b2b5360a57d69bded3aed38d32b9ab58c 100644 (file)
@@ -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<Batch>::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<Batch>::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);
 }