X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbatch.cpp;h=7100653ea17800cf9ebd6364e6d5fba41443948b;hb=5a93cc603eef43617a10b76bc9c19a3272ac1d49;hp=7f9adff7aad42ca8a9cb8e3bd4758ff2048acb75;hpb=8b99547d099c96bd8cc6037e2026db123b2523c1;p=libs%2Fgl.git diff --git a/source/batch.cpp b/source/batch.cpp index 7f9adff7..7100653e 100644 --- a/source/batch.cpp +++ b/source/batch.cpp @@ -246,10 +246,10 @@ void Batch::draw() const restart_index = 0; } - if(Buffer *ibuf = get_buffer()) + Buffer *ibuf = get_buffer(); + BindRestore _bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER); + if(ibuf) { - BindRestore _bind_ibuf(ibuf, ELEMENT_ARRAY_BUFFER); - if(dirty) update_buffer();