]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/batch.cpp
Use the same index type for all of a Mesh's batches
[libs/gl.git] / source / core / batch.cpp
index 51746b37178a6345ca3e3ff1982a6bcdf7333e88..ebd7b049125137d2fb89f9d40255d44a139f5b8c 100644 (file)
@@ -65,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)