#ifndef MESH_H_ #define MESH_H_ #include #include #include "material.h" class Buffer; class Mesh { public: Mesh() = default; ~Mesh() = default; void add_buffer(const std::shared_ptr& buffer, const Material& material); [[nodiscard]] size_t num_buffers() const { return buffers_.size(); } [[nodiscard]] const std::shared_ptr& buffer(size_t index) const { return buffers_[index]; } [[nodiscard]] std::shared_ptr& buffer(size_t index) { return buffers_[index]; } [[nodiscard]] const Material& material(size_t index) const { return materials_[index]; } [[nodiscard]] Material& material(size_t index) { return materials_[index]; } void draw(); private: std::vector> buffers_; std::vector materials_; }; #endif // MESH_H_