Covellite++  Version: 2.3.0 Revision: ??? Platform: x64 Build: 23:13 04.01.2025
Кроссплатформенный фреймворк для разработки приложений на С++
Загрузка...
Поиск...
Не найдено
OpenGLCommon.Texture.hpp
1
2#pragma once
3#include <Covellite/Api/Defines.hpp>
4#include "OpenGLCommon.hpp"
5#include "Component.hpp"
6
7namespace covellite
8{
9
10namespace api
11{
12
13namespace renderer
14{
15
16class OpenGLCommon::Texture final
17{
18public:
19 using Ptr_t = ::std::shared_ptr<Texture>;
20 using Destination_t = ::std::pair<GLuint, ::std::string>;
21
22public:
23 void Bind(const bool = true) noexcept;
24 void MakeContent(const GLsizei, const GLsizei, const GLvoid *);
25
26protected:
27 static Destination_t GetDestination(const Component::Texture &);
28 static GLint GetFormat(const String_t &);
29 static GLuint BuildTexture(void) noexcept;
30
31public:
32 BinaryData_t m_ReadCopyData;
33 const Destination_t m_Destination;
34 const GLint m_Format;
35 const GLuint m_TextureId;
36 const bool m_IsMapping;
37 const GLenum m_Capacity;
38 const uint8_t Align[7] = { 0 };
39
40public:
41 explicit Texture(const Component::Texture &);
42 Texture(const Texture &) = delete;
43 Texture(Texture &&) = delete;
44 Texture & operator= (const Texture &) = delete;
45 Texture & operator= (Texture &&) = delete;
46 virtual ~Texture(void) noexcept;
47};
48
49} // namespace renderer
50
51} // namespace api
52
53} // namespace covellite