1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef MESH_H
- #define MESH_H
- #include <vector>
- #include "client/rendering/wrapper/VertexBuffer.h"
- class Mesh final {
- public:
- struct VertexData final {
- float x;
- float y;
- float z;
- float tx;
- float ty;
- float nx;
- float ny;
- float nz;
- };
- Mesh();
- void add(const VertexData& data);
- void clear();
- void build();
- void draw() const;
- private:
- VertexBuffer vertexBuffer;
- std::vector<VertexData> buffer;
- };
- #endif
|