MOS
vertex_array.hpp
1 #pragma once
2 
3 #include <mos/gfx/cloud.hpp>
4 #include <mos/gfx/mesh.hpp>
5 
6 #include <mos/gl/buffer.hpp>
7 
8 namespace mos::gl {
9 
10 class Vertex_array {
11  friend class Renderer;
12 private:
13  explicit Vertex_array(
14  const gfx::Cloud &cloud,
15  std::unordered_map<unsigned int, Buffer> &array_buffers);
16  explicit Vertex_array(
17  const gfx::Mesh &mesh, std::unordered_map<unsigned int, Buffer> &array_buffers,
18  std::unordered_map<unsigned int, Buffer> &element_array_buffers);
19 public:
20  ~Vertex_array();
21  Vertex_array(Vertex_array &&array) noexcept;
22  Vertex_array(const Vertex_array &array) = delete;
23  Vertex_array &operator=(const Vertex_array &array) = delete;
24  Vertex_array &operator=(Vertex_array &&array) noexcept;
25  GLuint id{0};
26 
27 private:
28  void release();
29 };
30 
31 }
Collection of particles for rendering, uses same texture.
Definition: cloud.hpp:16
Geometric data description, vertices and indices.
Definition: mesh.hpp:22
Definition: array_buffers.hpp:5
Render geometry shapes with OpenGL.
Definition: renderer.hpp:40
Definition: vertex_array.hpp:10