MayaFlux 0.5.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 220 of file PathOperator.cpp.

221{
222 std::vector<DirtyVertexRange> ranges;
223
224 uint32_t offset = 0;
225 uint32_t index = 0;
226 for (const auto& path : m_paths) {
227 const auto count = static_cast<uint32_t>(path->get_vertex_count());
228 if (path->needs_gpu_update()) {
229 ranges.push_back(DirtyVertexRange {
230 .group_index = index,
231 .vertex_offset = offset,
232 .vertex_count = count });
233 }
234 offset += count;
235 ++index;
236 }
237
238 return ranges;
239}
uint32_t index
Definition VKDevice.cpp:142
size_t count
float offset
std::vector< std::shared_ptr< GpuSync::PathGeneratorNode > > m_paths

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