1234567891011121314151617181920212223242526 |
- #ifndef STREAMBUFFER_H
- #define STREAMBUFFER_H
- #include "utils/Types.h"
- class StreamBuffer final {
- public:
- StreamBuffer(u64 size);
- StreamBuffer(const StreamBuffer& other) = delete;
- StreamBuffer(StreamBuffer&& other) = delete;
- StreamBuffer& operator=(const StreamBuffer& other) = delete;
- StreamBuffer& operator=(StreamBuffer&& other) = delete;
- void reset(u64 size);
- StreamBuffer& add(float f);
- void draw(uint floatPerVertex);
- private:
- u64 bufferSize;
- u64 offset;
- u64 index;
- float* buffer;
- };
- #endif
|