MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ dirty_vertex_ranges()

std::vector< GraphicsOperator::DirtyVertexRange > MayaFlux::Nodes::Network::PathOperator::dirty_vertex_ranges ( ) const
overridevirtual

One DirtyVertexRange per path whose PathGeneratorNode needs a GPU update, so add_control_point() on one path re-uploads only that path's vertices.

Ranges are in add_path() order, matching get_vertex_data() and build_cluster_ids(); group_index is the path index and feeds get_vertex_data_for_collection(). Empty when no path changed.

Reimplemented from MayaFlux::Nodes::Network::GraphicsOperator.

Definition at line 226 of file PathOperator.cpp.

227{
228 std::vector<DirtyVertexRange> ranges;
229
230 uint32_t offset = 0;
231 uint32_t index = 0;
232 for (const auto& path : m_paths) {
233 const auto count = static_cast<uint32_t>(path->get_vertex_count());
234 if (path->needs_gpu_update()) {
235 ranges.push_back(DirtyVertexRange {
236 .group_index = index,
237 .vertex_offset = offset,
238 .vertex_count = count });
239 }
240 offset += count;
241 ++index;
242 }
243
244 return ranges;
245}
uint64_t offset
Definition Composite.cpp:10
uint32_t index
Definition VKDevice.cpp:122
size_t count
std::vector< std::shared_ptr< GpuSync::PathGeneratorNode > > m_paths

References count, MayaFlux::Nodes::Network::GraphicsOperator::DirtyVertexRange::group_index, index, m_paths, and offset.