#pragma once #include #include "../GFX/Image/RawImage.hpp" #include "../GFX/Binder.hpp" #include "../GFX/Texture.hpp" #include "../GFX/Shading/Program.hpp" namespace MC::Util { class ImageViewer { public: explicit ImageViewer(const GFX::Image::RawImage& image, float window_aspect); void render() const; private: static GFX::Mesh create_mesh(float window_aspect, uint32_t image_width, uint32_t image_height); static constexpr float view_size = 1000.0f; static const char* vertex; static const char* fragment; GFX::BindableMesh m_mesh; GFX::Shading::Program m_program; GFX::Texture m_texture; }; }