MayaFlux 1.0.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 191 of file TopologyOperator.cpp.

192{
193 std::vector<DirtyVertexRange> ranges;
194
195 uint32_t offset = 0;
196 uint32_t index = 0;
197 for (const auto& topology : m_topologies) {
198 const auto count = static_cast<uint32_t>(topology->get_vertex_count());
199 if (topology->needs_gpu_update()) {
200 ranges.push_back(DirtyVertexRange {
201 .group_index = index,
202 .vertex_offset = offset,
203 .vertex_count = count });
204 }
205 offset += count;
206 ++index;
207 }
208
209 return ranges;
210}
uint64_t offset
Definition Composite.cpp:10
PrimitiveTopology topology
uint32_t index
Definition VKDevice.cpp:122
size_t count
std::vector< std::shared_ptr< GpuSync::TopologyGeneratorNode > > m_topologies

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