#pragma once #include #include "vertex.h" #include "utils.h" class VertexBufferObject { private: unsigned int _id = 0; std::vector _vertices; public: VertexBufferObject(); VertexBufferObject(const std::vector& vertices); VertexBufferObject(std::vector&& vertices); inline unsigned int id() const { return _id; } inline std::vector vertices() const { return _vertices; } inline void dispose() const; }; inline void VertexBufferObject::dispose() const { OPENGL_EXTRA_FUNCTIONS->glDeleteBuffers(1, &_id); }