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

◆ dirty_vertex_ranges()

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

One DirtyVertexRange per topology whose TopologyGeneratorNode needs a GPU update, so add_topology() or a point edit on one graph re-uploads only that graph's expanded line vertices.

Ranges are in add_topology() order, matching get_vertex_data() and build_cluster_ids(); group_index is the topology index and feeds get_vertex_data_for_collection(). Empty when no topology changed. A point edit within one graph still re-uploads that whole graph's range, since its connectivity rebuild is global; isolation here is across graphs, not within one.

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

Definition at line 185 of file TopologyOperator.cpp.

186{
187 std::vector<DirtyVertexRange> ranges;
188
189 uint32_t offset = 0;
190 uint32_t index = 0;
191 for (const auto& topology : m_topologies) {
192 const auto count = static_cast<uint32_t>(topology->get_vertex_count());
193 if (topology->needs_gpu_update()) {
194 ranges.push_back(DirtyVertexRange {
195 .group_index = index,
196 .vertex_offset = offset,
197 .vertex_count = count });
198 }
199 offset += count;
200 ++index;
201 }
202
203 return ranges;
204}
uint32_t index
Definition VKDevice.cpp:142
size_t count
float offset
std::vector< std::shared_ptr< GpuSync::TopologyGeneratorNode > > m_topologies

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