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

◆ set_vertices() [1/2]

void MayaFlux::Buffers::DataWriteProcessor::set_vertices ( const void *  data,
size_t  byte_count 
)

Supply pre-packed interleaved vertex bytes for the next cycle.

data must point to N contiguous 60-byte Vertex records. byte_count must be a multiple of 60. Routed through the VERTICES_3D path: no channel assembly, no conversion.

Thread-safe. The bytes are copied into the pending slot and the dirty flag is set. Upload is deferred to processing_function() on the graphics thread.

Parameters
dataPointer to interleaved vertex data.
byte_countTotal size in bytes; must be a multiple of 60.

Definition at line 38 of file DataWriteProcessor.cpp.

39{
40 const auto* src = static_cast<const uint8_t*>(data);
41 m_data_pending = { Kakshya::DataVariant { std::vector<uint8_t>(src, src + byte_count) } };
42 m_data_dirty.test_and_set(std::memory_order_release);
43}
std::vector< Kakshya::DataVariant > m_data_pending
std::variant< std::vector< double >, std::vector< float >, std::vector< uint8_t >, std::vector< uint16_t >, std::vector< uint32_t >, std::vector< std::complex< float > >, std::vector< std::complex< double > >, std::vector< glm::vec2 >, std::vector< glm::vec3 >, std::vector< glm::vec4 >, std::vector< glm::mat4 > > DataVariant
Multi-type data storage for different precision needs.
Definition NDData.hpp:76

References m_data_dirty, and m_data_pending.