summary refs log tree commit diff
path: root/src/Util
diff options
context:
space:
mode:
Diffstat (limited to 'src/Util')
-rw-r--r--src/Util/ImageViewer.cpp4
-rw-r--r--src/Util/ImageViewer.hpp7
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;
 };