try_export_glb

Function try_export_glb 

Source
pub fn try_export_glb(
    content: &[u8],
    opts: &GltfOptions,
) -> Result<Vec<u8>, ExportError>
Expand description

Export the render geometry in content as a binary GLB.

Fail-closed: an empty visible mesh set is ExportError::NoRenderGeometry, never a zero-mesh GLB. That GLB is not valid glTF (its accessors, bufferViews, meshes and nodes are empty arrays where the schema says minItems: 1, and buffers[0].byteLength is 0 where it says minimum: 1), so success implies the artifact contains at least one mesh and every caller (CLI, MCP, SDK, viewer, direct Rust) inherits the guard. Every from-bytes GLB entry point refuses it the same way (#4685).