Skip to content

Commit

Permalink
Fix color update in gpu (#6886)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdh981009 authored Aug 1, 2024
1 parent f02e7d2 commit b271acb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ void FilamentScene::UpdateGeometry(const std::string& object_name,
const size_t color_array_size = n_vertices * 3 * sizeof(float);
if (pcloud_is_gpu) {
auto color_data = static_cast<float*>(malloc(color_array_size));
memcpy(color_data, cpu_pcloud.GetPointPositions().GetDataPtr(),
memcpy(color_data, cpu_pcloud.GetPointColors().GetDataPtr(),
color_array_size);
filament::VertexBuffer::BufferDescriptor color_descriptor(
color_data, color_array_size, DeallocateBuffer);
Expand Down

0 comments on commit b271acb

Please sign in to comment.