refactor export equirectangular

This commit is contained in:
2019-08-15 19:12:50 +02:00
parent e959fb4d91
commit 542e5a9c19
12 changed files with 223 additions and 206 deletions

View File

@@ -23,9 +23,30 @@ public:
bool ready() const { return m_tex != 0; }
void create_mipmaps();
glm::vec2 size() const;
Image get_image() const noexcept;
~Texture2D();
};
struct TextureCube
{
TextureCube() noexcept = default;
TextureCube(const TextureCube&) = delete;
void operator=(const TextureCube&) = delete;
TextureCube(TextureCube&& other) noexcept;
void operator=(TextureCube&& other) noexcept;
~TextureCube() noexcept;
static std::array<int, 6> m_faces_map;
GLuint m_cubetex_id;
std::array<GLuint, 6> m_faces{ 0 };
int m_resolution = 0;
bool create(int resolution) noexcept;
void destroy() noexcept;
void bind() const noexcept;
};
class Sampler
{
GLuint id = 0;