Covellite++  Version: 2.3.1 Revision: ??? Platform: x64 Build: 21:47 08.04.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 static Destination_t GetDestination(const int, const String_t &, const String_t &);
26
27protected:
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 GLenum m_Target;
39 const uint8_t Align[3] = { 0 };
40
41public:
42 explicit Texture(const Component::Texture &);
43 Texture(const Component::Texture &, bool /*_IsTextureArray*/);
44 Texture(const Texture &) = delete;
45 Texture(Texture &&) = delete;
46 Texture & operator= (const Texture &) = delete;
47 Texture & operator= (Texture &&) = delete;
48 virtual ~Texture(void) noexcept;
49};
50
51} // namespace renderer
52
53} // namespace api
54
55} // namespace covellite