blob: aa48b1e83a99ee273113634239d7ca0a892e12a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#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);
void render();
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;
};
}
|