#pragma once #ifdef __APPLE__ #include #else #define GLFW_INCLUDE_NONE #include #ifdef __APPLE__ #include #endif #endif #include namespace renderer { class Mesh { public: Mesh(); ~Mesh(); bool createFromPositions( const std::vector< float > &positions, bool lines = false ); bool createFromPosTex( const std::vector< float > &data ); bool createFromPosTexNormal( const std::vector< float > &data ); bool createFromPosTexNormalIndexed( const std::vector< float > &data, const std::vector< unsigned int > &indices ); void draw() const; private: GLuint mVAO; GLuint mVBO; GLuint mEBO; GLsizei mVertexCount; GLsizei mIndexCount; GLenum mMode; }; } // namespace renderer