MOS
texture_buffer_2d.hpp
1 #pragma once
2 
3 #include <glad/glad.h>
4 #include <mos/gfx/texture_2d.hpp>
5 
6 namespace mos::gl {
7 
9  friend class Renderer;
10 public:
11  using Time_point = std::chrono::time_point<std::chrono::system_clock,
12  std::chrono::nanoseconds>;
13 
14  explicit Texture_buffer_2D(const gfx::Texture_2D &texture_2d);
15 private:
17  GLint internal_format, GLenum external_format, int width, int height,
18  GLint filter_min, GLint filter_mag, GLint wrap, const void *data,
19  const Time_point &modified = std::chrono::system_clock::now());
20 public:
22  Texture_buffer_2D(const Texture_buffer_2D &buffer) = delete;
23  Texture_buffer_2D(Texture_buffer_2D &&buffer) noexcept;
24  Texture_buffer_2D &operator=(const Texture_buffer_2D &buffer) = delete;
25  Texture_buffer_2D &operator=(Texture_buffer_2D &&buffer) noexcept;
26  GLuint texture{0};
27  Time_point modified;
28 
29 private:
30  void release();
31 };
32 }
Definition: texture_buffer_2d.hpp:8
Definition: array_buffers.hpp:5
Texture in two dimension.
Definition: texture_2d.hpp:17
Render geometry shapes with OpenGL.
Definition: renderer.hpp:40