StreamBuffer.h 550 B

1234567891011121314151617181920212223242526
  1. #ifndef STREAMBUFFER_H
  2. #define STREAMBUFFER_H
  3. #include "utils/Types.h"
  4. class StreamBuffer final {
  5. public:
  6. StreamBuffer(u64 size);
  7. StreamBuffer(const StreamBuffer& other) = delete;
  8. StreamBuffer(StreamBuffer&& other) = delete;
  9. StreamBuffer& operator=(const StreamBuffer& other) = delete;
  10. StreamBuffer& operator=(StreamBuffer&& other) = delete;
  11. void reset(u64 size);
  12. StreamBuffer& add(float f);
  13. void draw(uint floatPerVertex);
  14. private:
  15. u64 bufferSize;
  16. u64 offset;
  17. u64 index;
  18. float* buffer;
  19. };
  20. #endif