X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmesh.cpp;h=91dadeab00af09b584aaf1abad7b54333bbc7812;hb=61ff840cd211f10d45dca8c4dad2cca5f68aaa42;hp=413986f463d60180d50f8b0d37982256e7c43ac5;hpb=8b99547d099c96bd8cc6037e2026db123b2523c1;p=libs%2Fgl.git diff --git a/source/mesh.cpp b/source/mesh.cpp index 413986f4..91dadeab 100644 --- a/source/mesh.cpp +++ b/source/mesh.cpp @@ -155,19 +155,12 @@ void Mesh::draw() const 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::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