Esc

gltf_local_resolve

procedureextensionsince 0.36.1Source
  • macOS: gltf_local_resolve works on macOS
  • Linux: gltf_local_resolve works on Linux
  • Windows: gltf_local_resolve works on Windows
  • Wasm: gltf_local_resolve is not available on Wasm

Pass the asset's folder as user data, pointing to a string. Resolves only contained files.

Signature

gltf_local_resolve :: (
    user: *void,
    uri: string,
    limit: s64
) -> (string, bool)
Example
folder := "assets"; // contains the .bin and image files the glTF names
resolver := Gltf_Resolver.{ gltf_local_resolve, *folder };
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"}}", resolver);
assert(error.kind == .NONE);
gltf_free(*asset);