Function rend3_gltf::load_image
source · [−]pub async fn load_image<F, Fut, E>(
renderer: &Renderer,
image: Image<'_>,
srgb: bool,
buffers: &[Vec<u8>],
io_func: &mut F
) -> Result<Labeled<Texture>, GltfLoadError<E>> where
F: FnMut(SsoString) -> Fut,
Fut: Future<Output = Result<Vec<u8>, E>>,
E: Error + 'static,
Expand description
Loads a single image from a gltf::Image
.
All binary data buffers must be provided. Call this with
gltf::Document::materials
as the materials argument.
io_func determines how URIs are resolved into their underlying data.