data.push_back(i);
}
-void Batch::upload_data() const
-{
- get_buffer()->sub_data(get_offset(), data.size(), &data[0]);
-}
-
unsigned Batch::get_index_size() const
{
if(data_type==UNSIGNED_SHORT)
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();