Esc

Gltf_Options

structextensionsince 0.36.1Source
  • macOS: Gltf_Options works on macOS
  • Linux: Gltf_Options works on Linux
  • Windows: Gltf_Options works on Windows
  • Wasm: Gltf_Options works on Wasm

Declaration

Gltf_Options :: struct {
// input bytes    max_size: s64 = 64 * 1024 * 1024;// all buffers together    max_buffer_bytes: s64 = 512 * 1024 * 1024;// objects in the whole document    max_count: s64 = 1000000;// JSON nesting    max_depth: s64 = 64;}

Limits that keep hostile input bounded; each is checked while loading.

Example↗
text := "{\"asset\":{\"version\":\"2.0\"}}";
_, error := gltf_load(text, .{}, .{ max_size = 8 });
assert(error.kind == .LIMIT);
gltf_error_free(*error);

See also