#ifndef MESH_INCLUDED_H #define MESH_INCLUDED_H #include #include #include #include class IndexedModel; class Vertex; enum MeshBufferPositions { POSITION_VB, TEXCOORD_VB, NORMAL_VB, INDEX_VB }; class Mesh { public: explicit Mesh(const std::string & fileName); explicit Mesh(const IndexedModel & model); Mesh(Vertex * vertices, unsigned int numVertices, unsigned int * indices, unsigned int numIndices); Mesh(const Mesh &) = delete; void operator=(const Mesh &) = delete; virtual ~Mesh(); void Draw(); private: static constexpr unsigned int NUM_BUFFERS {4}; GLuint m_vertexArrayObject; std::array m_vertexArrayBuffers; size_t m_numIndices; }; #endif