|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| FormaBuffer::SliceId MayaFlux::Buffers::FormaBuffer::add_slice | ( | const std::vector< uint8_t > & | bytes, |
| std::optional< Portal::Graphics::PrimitiveTopology > | topology = std::nullopt |
||
| ) |
Add a block of vertices that shares this buffer with the others.
submit() writes a default block of its own, so a buffer used only through submit() holds one. Blocks share the buffer's topology and are uploaded together; each can be updated, hidden or reordered without touching the rest. Several blocks cost one draw when they are adjacent, visible and in order.
Valid once setup_processors() has run.
| bytes | Whole interleaved vertices matching the topology; a trailing partial vertex is dropped. |
| topology | Topology of this block; the buffer's when omitted. A different topology needs setup_rendering with triangulate, which draws mixed blocks as one batch. |
Definition at line 178 of file FormaBuffer.cpp.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, m_processor, MF_ERROR, and topology().
Referenced by MayaFlux::Portal::Forma::FormaTarget::slice_of().
Here is the call graph for this function:
Here is the caller graph for this function: