#pragma once #include "../GFX/Actions.hpp" #include "../GFX/Mesh.hpp" #include "../GFX/Image/RawImage.hpp" #include "../GFX/Texture.hpp" namespace MC::Util { class ImageViewer { public: explicit ImageViewer(const GFX::Image::RawImage& image, Real window_aspect) : m_mesh(create_mesh(window_aspect, image.width(), image.height())), m_texture(image) {} void render(GFX::Actions& actions); private: static GFX::Mesh create_mesh(Real window_aspect, U32 image_width, U32 image_height); static constexpr Real view_size = 1000.0f; GFX::Mesh m_mesh; GFX::Texture m_texture; }; }