]> git.tdb.fi Git - libs/gl.git/blobdiff - source/mesh.cpp
Use BindRestore for binding index buffer
[libs/gl.git] / source / mesh.cpp
index 301c00f94b331fc6c87087bc9f79a8b558c675a0..44568697f4f6dfd46aca884b9a6ebb8cffc05db3 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)