|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::optional< Kakshya::MeshData > MayaFlux::IO::download_compute_mesh | ( | const std::shared_ptr< Buffers::ComputeMeshBuffer > & | buffer | ) |
Download a ComputeMeshBuffer's current live geometry to CPU.
ComputeMeshBuffer's own doc states its live rendering path never reads back vertex data; this is the deliberate, one-shot exception for export. Reads the true live vertex count off the atomic counter buffer's mapped pointer (host-visible, no transfer), then downloads exactly that many vertices from the buffer itself, not its worst-case allocated capacity. The result is non-indexed triangles, so a trivial sequential index array (0..N-1) is synthesized to satisfy Kakshya::MeshData's index requirement.
| buffer | Source buffer. setup_processors() must have run. |
Definition at line 279 of file ModelExport.cpp.
References buffer, and MayaFlux::Buffers::download_compute_mesh().
Referenced by save_mesh().
Here is the call graph for this function:
Here is the caller graph for this function: