Esc

Gltf_Wrap

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

Declaration

Gltf_Wrap :: enum u32 {
    CLAMP_TO_EDGE :: 33071;    MIRRORED_REPEAT :: 33648;    REPEAT :: 10497;}

A sampler's texture wrapping mode, with the glTF numeric codes. The default is .REPEAT.

Example↗
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"images\":[{\"uri\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==\"}],\"samplers\":[{\"magFilter\":9729,\"wrapS\":33071}],\"textures\":[{\"sampler\":0,\"source\":0}],\"materials\":[{\"pbrMetallicRoughness\":{\"baseColorTexture\":{\"index\":0},\"metallicFactor\":0.5},\"alphaMode\":\"BLEND\"}]}");
assert(error.kind == .NONE);
defer gltf_free(*asset);
sampler := asset.document.samplers[0];
assert(sampler.wrap_s == .CLAMP_TO_EDGE && sampler.wrap_t == .REPEAT);

See also