}
upload_data(0);
- dirty = false;
}
void Bufferable::upload_data(char *target) const
}
else
buffer->sub_data(offset, get_data_size(), get_data_pointer());
+ dirty = false;
}
// Update all bufferables in the same buffer at once
for(const Bufferable *b=bufferable.prev_in_buffer; b; b=b->prev_in_buffer)
if(b->dirty || buffer_resized)
- {
b->upload_data(mapped_address+b->offset);
- b->dirty = false;
- }
for(const Bufferable *b=bufferable.next_in_buffer; b; b=b->next_in_buffer)
if(b->dirty || buffer_resized)
- {
b->upload_data(mapped_address+b->offset);
- b->dirty = false;
- }
}
} // namespace GL
copy(data.begin(), data.end(), target);
else
buf_range->data(&data[0]);
+ dirty = false;
}
void UniformBlock::attach(int index, const Uniform &uni)