Mesh.h 505 B

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