Fixed issue in point_cloud_vertex_buffer_manager.cpp
This commit is contained in:
@@ -18,6 +18,7 @@ struct generic_mesh_view
|
||||
mesh_vertex_components::flags component_flags;
|
||||
std::span<mesh_data::index_type> indices;
|
||||
std::tuple<std::span<Ts>...> vertex_component_arrays;
|
||||
std::size_t vertex_count;
|
||||
material_store::id_type material_id;
|
||||
};
|
||||
|
||||
|
||||
@@ -13,8 +13,9 @@ namespace detail
|
||||
template<typename... Ts>
|
||||
struct generic_point_cloud_view
|
||||
{
|
||||
point_cloud_vertex_components::flags vertex_components;
|
||||
point_cloud_vertex_components::flags vertex_component_flags;
|
||||
std::tuple<std::span<Ts>...> vertex_component_arrays;
|
||||
std::size_t point_count;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
[[nodiscard]] point_cloud_handle handle() const;
|
||||
|
||||
[[nodiscard]] point_cloud_vertex_components::flags components() const;
|
||||
[[nodiscard]] assets::point_cloud_vertex_components::flags components() const;
|
||||
|
||||
private:
|
||||
point_cloud_handle m_handle{};
|
||||
|
||||
@@ -100,7 +100,10 @@ void interlace(
|
||||
buffers...
|
||||
);
|
||||
|
||||
const auto vertex_count = std::min({ buffers.size()... });
|
||||
const auto vertex_count = std::min({
|
||||
|
||||
buffers.size()...
|
||||
});
|
||||
const auto buffer_size = stride * vertex_count;
|
||||
|
||||
vertex_buffer.resize(buffer_size);
|
||||
|
||||
Reference in New Issue
Block a user