X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbatch.cpp;h=ebd7b049125137d2fb89f9d40255d44a139f5b8c;hb=6955c16bb123f3b795186c99442dc4d92be0ebc9;hp=2bc44c9ddfe285c1dac5afa2fb2cd28ef63fba16;hpb=9b3bce7ae76ff8c0c81315d2505ea96bf422a318;p=libs%2Fgl.git diff --git a/source/core/batch.cpp b/source/core/batch.cpp index 2bc44c9d..ebd7b049 100644 --- a/source/core/batch.cpp +++ b/source/core/batch.cpp @@ -1,7 +1,6 @@ #include #include #include "batch.h" -#include "bindable.h" #include "buffer.h" #include "error.h" #include "mesh.h" @@ -66,6 +65,8 @@ Batch::~Batch() void Batch::set_index_type(DataType t) { + if(t==index_type) + return; if(t!=UNSIGNED_SHORT && t!=UNSIGNED_INT) throw invalid_argument("Batch::set_data_type"); if(t==UNSIGNED_SHORT && max_index>0xFFFE)