summaryrefslogtreecommitdiffhomepage
path: root/draw/floor-mesh.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-25 16:37:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-25 16:37:58 +0200
commitf1df7c20129a1f1cc47c47e5731efd10f8e49aeb (patch)
tree0241e953981404e50a5c1fcd6d49f583ecf5995e /draw/floor-mesh.hpp
parenta00ac8b5fed9d03cb2b3eafb4cd7d04546e341b1 (diff)
rename in draw/
Diffstat (limited to 'draw/floor-mesh.hpp')
-rw-r--r--draw/floor-mesh.hpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/draw/floor-mesh.hpp b/draw/floor-mesh.hpp
deleted file mode 100644
index f81a7593..00000000
--- a/draw/floor-mesh.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma once
-#include "tile-defs.hpp"
-#include <array>
-#include <Corrade/Containers/ArrayViewStl.h>
-#include <Magnum/Magnum.h>
-#include <Magnum/Math/Vector2.h>
-#include <Magnum/Math/Vector3.h>
-#include <Magnum/GL/Mesh.h>
-#include <Magnum/GL/Buffer.h>
-
-namespace floormat {
-
-struct tile_shader;
-struct chunk;
-struct tile;
-
-struct floor_mesh final
-{
- floor_mesh();
- floor_mesh(floor_mesh&&) = delete;
- floor_mesh(const floor_mesh&) = delete;
-
- void draw(tile_shader& shader, chunk& c);
-
-private:
- struct vertex_data final { Vector2 texcoords; };
- using quad_data = std::array<vertex_data, 4>;
-
- static std::array<std::array<UnsignedShort, 6>, TILE_COUNT> make_index_array();
- static std::array<std::array<Vector3, 4>, TILE_COUNT> make_position_array();
-
- GL::Mesh _mesh;
- GL::Buffer _vertex_buffer{std::array<quad_data, TILE_COUNT>{}, Magnum::GL::BufferUsage::DynamicDraw},
- _index_buffer{make_index_array()}, _positions_buffer{make_position_array()};
-
- static void set_tile(quad_data& data, tile& x);
-};
-
-} // namespace floormat