summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wireframe-mesh.cpp3
-rw-r--r--src/wireframe-mesh.hpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/wireframe-mesh.cpp b/src/wireframe-mesh.cpp
index 5b60cead..236f27ed 100644
--- a/src/wireframe-mesh.cpp
+++ b/src/wireframe-mesh.cpp
@@ -2,6 +2,7 @@
#include "shaders/tile-shader.hpp"
#include <Corrade/Containers/Array.h>
#include <Magnum/ImageView.h>
+#include <Magnum/GL/Renderer.h>
#include <Magnum/GL/TextureFormat.h>
#include <Magnum/PixelFormat.h>
#include <Magnum/Trade/ImageData.h>
@@ -55,9 +56,11 @@ template <traits T> wireframe_mesh<T>::wireframe_mesh()
template <traits T> void wireframe_mesh<T>::draw(tile_shader& shader, T x)
{
+ GL::Renderer::setLineWidth(2);
_positions_buffer.setData(x.make_vertex_positions_array(), GL::BufferUsage::DynamicDraw);
if constexpr(T::num_indices > 0)
_index_buffer.setData(x.make_index_array(), GL::BufferUsage::DynamicDraw);
+ _texture.bind(0);
shader.draw(_mesh);
}
diff --git a/src/wireframe-mesh.hpp b/src/wireframe-mesh.hpp
index c31ee1d0..28619e90 100644
--- a/src/wireframe-mesh.hpp
+++ b/src/wireframe-mesh.hpp
@@ -75,4 +75,6 @@ private:
extern template struct wireframe_mesh<wireframe_traits::null>;
extern template struct wireframe_mesh<wireframe_traits::quad>;
+using wireframe_quad_mesh = wireframe_mesh<wireframe_traits::quad>;
+
} // namespace Magnum::Examples