Crate rend3_gltf[][src]

Expand description

gltf scene and model loader for rend3.

This crate attempts to map the concepts into gltf as best it can into rend3, but there is quite a variety of things that would be insane to properly represent.

To “just load a gltf/glb”, look at the documentation for load_gltf and use the default filesystem_io_func.

Individual components of a gltf can be loaded with the other functions in this crate.

Supported Extensions

  • KHR_punctual_lights
  • KHR_texture_transform
  • KHR_material_unlit

Known Limitations

  • Only the albedo texture’s transform from KHR_texture_transform will be used.
  • Double sided materials are currently unsupported.

Modules

Implementation utilities.

Structs

Hashmap key for caching images.

Wrapper around a T that stores an optional label.

A fully loaded Gltf scene.

Set of MeshPrimitives that make up a logical mesh.

A single sub-mesh of a gltf.

Node in the gltf scene tree

Set of [ObjectHandle]s that correspond to a logical object in the node tree.

A uploaded texture and its format.

Enums

Describes how loading gltf failed.

Functions

Adds a single mesh from the LoadedGltfScene found by its index, as an object to the scene.

Default implementation of load_gltf’s io_func that loads from the filesystem relative to the gltf.

Loads buffers from a gltf::Buffer iterator, calling io_func to resolve them from URI.

Creates a gltf default material.

Load a given gltf into the renderer’s world.

Load a given gltf’s data, like meshes and materials, without yet adding any of the nodes to the scene.

Loads a single image from a gltf::Image.

Loads a single image from a gltf::Image, with caching.

Loads materials and textures from a gltf::Material iterator.

Loads meshes from a gltf::Mesh iterator.

Type Definitions

Hashmap which stores a mapping from ImageKey to a labeled handle.