mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Ensured resets genuinely kill outstanding data.
This commit is contained in:
parent
a4c7b00ecd
commit
7857ef774f
@ -148,6 +148,14 @@ void ArrayBuilder::Buffer::flush()
|
||||
}
|
||||
|
||||
flushed_data = allocated_data;
|
||||
|
||||
if(was_reset)
|
||||
{
|
||||
allocated_data = 0;
|
||||
flushed_data = 0;
|
||||
submitted_data = 0;
|
||||
was_reset = false;
|
||||
}
|
||||
}
|
||||
|
||||
size_t ArrayBuilder::Buffer::submit(bool is_input)
|
||||
@ -174,8 +182,6 @@ void ArrayBuilder::Buffer::bind()
|
||||
|
||||
void ArrayBuilder::Buffer::reset()
|
||||
{
|
||||
allocated_data = 0;
|
||||
flushed_data = 0;
|
||||
submitted_data = 0;
|
||||
was_reset = true;
|
||||
is_full = false;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class ArrayBuilder {
|
||||
size_t allocated_data;
|
||||
size_t flushed_data;
|
||||
size_t submitted_data;
|
||||
bool is_full;
|
||||
bool is_full, was_reset;
|
||||
GLuint buffer;
|
||||
|
||||
uint8_t *get_storage(size_t size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user