diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-09 22:46:17 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-09 22:46:17 +0200 |
commit | a5d5ad64ff97201e2ccf83c1d79008190906ebcd (patch) | |
tree | ebde66821202c21d339d2164c14abc0518c8e7f2 /serialize/world-reader.cpp | |
parent | c04906db429b7c626a753d49e2d64c51135c6039 (diff) |
move scenery draw scratch buffers to central place
Diffstat (limited to 'serialize/world-reader.cpp')
-rw-r--r-- | serialize/world-reader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp index c481a7e6..69f7c58e 100644 --- a/serialize/world-reader.cpp +++ b/serialize/world-reader.cpp @@ -38,6 +38,10 @@ private: std::vector<std::shared_ptr<tile_atlas>> atlases; world* _world; uint16_t PROTO = proto_version; + + Array<chunk::entity_draw_order> draw_array; + std::vector<std::array<chunk::vertex, 4>> draw_vertexes; + std::vector<std::array<UnsignedShort, 6>> draw_indexes; }; reader_state::reader_state(world& world) noexcept : _world{&world} {} @@ -317,7 +321,7 @@ void reader_state::read_chunks(reader_t& s) c.sort_entities(); c.ensure_ground_mesh(); c.ensure_wall_mesh(); - c.ensure_scenery_mesh(array); + c.ensure_scenery_mesh({ draw_array, draw_vertexes, draw_indexes }); c.ensure_passability(); } } |