#ifndef MESH_H
#define MESH_H

#include "rendering/wrapper/VertexBuffer.h"
#include "utils/List.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;
    List<VertexData, 65536 * 2> buffer;
};

#endif