diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chunk-region.cpp | 4 | ||||
-rw-r--r-- | src/chunk-scenery.cpp | 4 | ||||
-rw-r--r-- | src/chunk-scenery.hpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/chunk-region.cpp b/src/chunk-region.cpp index a787b79b..3c5a8746 100644 --- a/src/chunk-region.cpp +++ b/src/chunk-region.cpp @@ -132,12 +132,12 @@ auto default_region_predicate(chunk& c) noexcept } // namespace -auto chunk::make_pass_region(bool debug, ArrayView<Vector2i> positions) -> pass_region +auto chunk::make_pass_region(bool debug, ArrayView<const Vector2i> positions) -> pass_region { return make_pass_region(default_region_predicate(*this), debug, positions); } -auto chunk::make_pass_region(const pred& f, bool debug, ArrayView<Vector2i> positions) -> pass_region +auto chunk::make_pass_region(const pred& f, bool debug, ArrayView<const Vector2i> positions) -> pass_region { Timeline timeline; timeline.start(); diff --git a/src/chunk-scenery.cpp b/src/chunk-scenery.cpp index 3b816a9b..ca888588 100644 --- a/src/chunk-scenery.cpp +++ b/src/chunk-scenery.cpp @@ -173,8 +173,8 @@ auto chunk::ensure_scenery_mesh(scenery_scratch_buffers buffers) noexcept -> sce } GL::Mesh mesh{GL::MeshPrimitive::Triangles}; - auto vert_view = ArrayView<std::array<vertex, 4>>{scenery_vertexes, count}; - auto index_view = ArrayView<std::array<UnsignedShort, 6>>{scenery_indexes, count}; + auto vert_view = ArrayView<const std::array<vertex, 4>>{scenery_vertexes, count}; + auto index_view = ArrayView<const std::array<UnsignedShort, 6>>{scenery_indexes, count}; mesh.addVertexBuffer(GL::Buffer{vert_view}, 0, tile_shader::Position{}, tile_shader::TextureCoordinates{}, tile_shader::Depth{}) .setIndexBuffer(GL::Buffer{index_view}, 0, GL::MeshIndexType::UnsignedShort) .setCount(int32_t(6 * count)); diff --git a/src/chunk-scenery.hpp b/src/chunk-scenery.hpp index 89e40078..85bddd7a 100644 --- a/src/chunk-scenery.hpp +++ b/src/chunk-scenery.hpp @@ -30,7 +30,7 @@ struct chunk::object_draw_order struct chunk::scenery_mesh_tuple { GL::Mesh& mesh; - ArrayView<object_draw_order> array; + ArrayView<const object_draw_order> array; size_t size; }; |