diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-09 11:45:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-09 11:45:34 +0100 |
commit | ff3a18b1a251a5e85057e52303efa0cdd79e8a66 (patch) | |
tree | 44c2f3a6f69bc922d71063debd14ba669c74ca0d /draw/floor.hpp | |
parent | b4770eb85369e91cbf800e8192dac0d8c0c627cf (diff) |
add floor mesh to struct chunk
Diffstat (limited to 'draw/floor.hpp')
-rw-r--r-- | draw/floor.hpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/draw/floor.hpp b/draw/floor.hpp index 651cee61..07e183d6 100644 --- a/draw/floor.hpp +++ b/draw/floor.hpp @@ -21,19 +21,6 @@ struct floor_mesh final 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_ref& x); }; } // namespace floormat |