Esc

Gltf_Accessor_Type

enumextensionsince 0.36.1Source
  • macOS: Gltf_Accessor_Type works on macOS
  • Linux: Gltf_Accessor_Type works on Linux
  • Windows: Gltf_Accessor_Type works on Windows
  • Wasm: Gltf_Accessor_Type works on Wasm

Declaration

Gltf_Accessor_Type :: enum u8 {
    SCALAR;    VEC2;    VEC3;    VEC4;    MAT2;    MAT3;    MAT4;}

How many components make one accessor element: a scalar, a vector of 2 to 4, or a 2x2 to 4x4 matrix.

Example↗
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"accessors\":[{\"componentType\":5126,\"count\":3,\"type\":\"VEC3\",\"min\":[0,0,0],\"max\":[1,1,0]}],\"meshes\":[{\"primitives\":[{\"attributes\":{\"POSITION\":0}}]}]}");
assert(error.kind == .NONE);
defer gltf_free(*asset);
assert(asset.document.accessors[0].type == .VEC3);

See also