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

◆ set_vertices()

void MayaFlux::Buffers::GeometryWriteProcessor::set_vertices ( const void *  data,
size_t  byte_count,
const Kakshya::VertexLayout layout 
)

Supply pre-resolved vertex bytes for the next cycle.

Parameters
dataPointer to vertex data.
byte_countTotal size in bytes.
layoutVertexLayout describing stride and attributes.

Bypasses as_*_vertex_access conversion entirely. The processor copies the data and uploads it on the next graphics cycle.

Definition at line 19 of file GeometryWriteProcessor.cpp.

22{
23 VertexSnapshot snap;
24 snap.bytes.resize(byte_count);
25 std::memcpy(snap.bytes.data(), data, byte_count);
26 snap.layout = layout;
27
28 m_pending_vertices = std::move(snap);
29 m_vertices_dirty.test_and_set(std::memory_order_release);
30}
std::optional< VertexSnapshot > m_pending_vertices

References MayaFlux::Buffers::VertexSnapshot::bytes, MayaFlux::Buffers::VertexSnapshot::layout, m_pending_vertices, and m_vertices_dirty.