diff options
| author | Mel <einebeere@gmail.com> | 2023-07-29 03:31:42 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-29 03:31:42 +0200 |
| commit | 6b69d4b5b648253f894707723af0e2eae9f71445 (patch) | |
| tree | 0cd0b6c7b18c30abbb2618f553f144d1d06dacba /src/Util | |
| parent | 2eef7cf49b7a15559ee7bb6719411bcf67386213 (diff) | |
| download | meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.tar.zst meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.zip | |
Move chunk reification to worker threads and set stage for chunk-unbound lighting
Diffstat (limited to 'src/Util')
| -rw-r--r-- | src/Util/ImageViewer.cpp | 4 | ||||
| -rw-r--r-- | src/Util/ImageViewer.hpp | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Util/ImageViewer.cpp b/src/Util/ImageViewer.cpp index 6c88c78..4c78750 100644 --- a/src/Util/ImageViewer.cpp +++ b/src/Util/ImageViewer.cpp @@ -12,7 +12,7 @@ ImageViewer::ImageViewer( {GFX::Shading::Shader::Type::Vertex, vertex}, {GFX::Shading::Shader::Type::Fragment, fragment} ), - m_mesh(GFX::Binder::load(create_mesh(window_aspect, image.width(), image.height()))) { + m_mesh(create_mesh(window_aspect, image.width(), image.height())) { m_program.bind(); auto model_uniform = m_program.uniform("model_matrix"); auto view_uniform = m_program.uniform("view_matrix"); @@ -25,7 +25,7 @@ ImageViewer::ImageViewer( m_program.unbind(); } -void ImageViewer::render() const { +void ImageViewer::render() { m_program.bind(); m_texture.bind(); m_mesh.bind(); diff --git a/src/Util/ImageViewer.hpp b/src/Util/ImageViewer.hpp index 1e18103..aa48b1e 100644 --- a/src/Util/ImageViewer.hpp +++ b/src/Util/ImageViewer.hpp @@ -1,8 +1,7 @@ #pragma once -#include <ostream> +#include "../GFX/Mesh.hpp" #include "../GFX/Image/RawImage.hpp" -#include "../GFX/Binder.hpp" #include "../GFX/Texture.hpp" #include "../GFX/Shading/Program.hpp" @@ -12,7 +11,7 @@ class ImageViewer { public: explicit ImageViewer(const GFX::Image::RawImage& image, Real window_aspect); - void render() const; + void render(); private: static GFX::Mesh create_mesh(Real window_aspect, U32 image_width, U32 image_height); @@ -21,7 +20,7 @@ private: static const Char* vertex; static const Char* fragment; - GFX::BindableMesh m_mesh; + GFX::Mesh m_mesh; GFX::Shading::Program m_program; GFX::Texture m_texture; }; |
