|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::optional< VertexAccess > MayaFlux::Kakshya::as_mesh_vertex_access | ( | const DataVariant & | variant, |
| const VertexAccessConfig & | config = {} |
||
| ) |
Convert DataVariant to mesh-vertex-compatible bytes.
Output layout matches VertexLayout::for_meshes(): stride 60, position (vec3, offset 0), color (vec3, offset 12), weight (float, offset 24), uv (vec2, offset 28), normal (vec3, offset 36), tangent (vec3, offset 48). Compatible with mesh.vert.spv without any user-defined shaders.
| variant | Source data. |
| config | Default attribute values (color, weight, uv). |
Definition at line 347 of file VertexAccess.cpp.
References MayaFlux::Kakshya::VertexAccess::byte_count, MayaFlux::Kakshya::VertexAccess::conversion_buffer, count, MayaFlux::Kakshya::VertexAccess::data_ptr, MayaFlux::Kakshya::VertexLayout::for_meshes(), MayaFlux::Journal::Kakshya, MayaFlux::Kakshya::VertexAccess::layout, MF_ERROR, MayaFlux::Journal::Runtime, and MayaFlux::Kakshya::VertexLayout::vertex_count.
Referenced by MayaFlux::Buffers::GeometryWriteProcessor::processing_function().
Here is the call graph for this function:
Here is the caller graph for this function: