mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-14 13:33:42 +00:00
This thing has clearly becoma a real class.
This commit is contained in:
parent
7857ef774f
commit
c2349ee3f4
@ -56,25 +56,27 @@ class ArrayBuilder {
|
|||||||
Submission submit();
|
Submission submit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Buffer {
|
class Buffer {
|
||||||
Buffer(size_t size, std::function<void(bool is_input, uint8_t *, size_t)> submission_function);
|
public:
|
||||||
~Buffer();
|
Buffer(size_t size, std::function<void(bool is_input, uint8_t *, size_t)> submission_function);
|
||||||
|
~Buffer();
|
||||||
|
|
||||||
std::vector<uint8_t> data;
|
uint8_t *get_storage(size_t size);
|
||||||
size_t allocated_data;
|
uint8_t *reget_storage(size_t &size);
|
||||||
size_t flushed_data;
|
|
||||||
size_t submitted_data;
|
|
||||||
bool is_full, was_reset;
|
|
||||||
GLuint buffer;
|
|
||||||
|
|
||||||
uint8_t *get_storage(size_t size);
|
void flush();
|
||||||
uint8_t *reget_storage(size_t &size);
|
size_t submit(bool is_input);
|
||||||
|
void bind();
|
||||||
|
void reset();
|
||||||
|
|
||||||
void flush();
|
private:
|
||||||
size_t submit(bool is_input);
|
bool is_full, was_reset;
|
||||||
void bind();
|
GLuint buffer;
|
||||||
void reset();
|
std::function<void(bool is_input, uint8_t *, size_t)> submission_function_;
|
||||||
std::function<void(bool is_input, uint8_t *, size_t)> submission_function_;
|
std::vector<uint8_t> data;
|
||||||
|
size_t allocated_data;
|
||||||
|
size_t flushed_data;
|
||||||
|
size_t submitted_data;
|
||||||
} output_, input_;
|
} output_, input_;
|
||||||
uint8_t *get_storage(size_t size, Buffer &buffer);
|
uint8_t *get_storage(size_t size, Buffer &buffer);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user