Mesh.h 523 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef MESH_H
  2. #define MESH_H
  3. #include "client/rendering/wrapper/VertexBuffer.h"
  4. #include "common/utils/List.h"
  5. class Mesh final {
  6. public:
  7. struct VertexData final {
  8. float x;
  9. float y;
  10. float z;
  11. float tx;
  12. float ty;
  13. float nx;
  14. float ny;
  15. float nz;
  16. };
  17. Mesh();
  18. void add(const VertexData& data);
  19. void clear();
  20. void build();
  21. void draw() const;
  22. private:
  23. VertexBuffer vertexBuffer;
  24. List<VertexData, 65536 * 2> buffer;
  25. };
  26. #endif