diff options
Diffstat (limited to 'src/Util/ImageViewer.hpp')
| -rw-r--r-- | src/Util/ImageViewer.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Util/ImageViewer.hpp b/src/Util/ImageViewer.hpp index aa48b1e..cfe9d18 100644 --- a/src/Util/ImageViewer.hpp +++ b/src/Util/ImageViewer.hpp @@ -1,27 +1,25 @@ #pragma once +#include "../GFX/Actions.hpp" #include "../GFX/Mesh.hpp" #include "../GFX/Image/RawImage.hpp" #include "../GFX/Texture.hpp" -#include "../GFX/Shading/Program.hpp" namespace MC::Util { class ImageViewer { public: - explicit ImageViewer(const GFX::Image::RawImage& image, Real window_aspect); + 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(); + 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; - static const Char* vertex; - static const Char* fragment; - GFX::Mesh m_mesh; - GFX::Shading::Program m_program; GFX::Texture m_texture; }; |
