Skip to content

Class GltfLoader

Namespace: Apogee.Content
Assembly: Apogee.Content.dll

Reads glTF 2.0 (.gltf with its files, or .glb) into a : the default scene's meshes placed in the world, metallic-roughness materials with their textures decoded, and punctual lights. Supported extensions: KHR_texture_transform, KHR_texture_basisu, KHR_materials_emissive_strength, KHR_materials_unlit, KHR_lights_punctual. Draco and meshopt compression are refused with a clear error.

public static class GltfLoader

Inheritance

object ← GltfLoader

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

Load(string, ContentOptions?)

public static ModelData Load(string path, ContentOptions? options = null)

Parameters

path string

options ContentOptions?

Returns

ModelData

Load(ReadOnlySpan<byte>, string, ContentOptions?, string)

Reads a model from memory. Files it refers to are looked for in baseDirectory, a folder or a virtual path such as res://models (read with ).

public static ModelData Load(ReadOnlySpan<byte> file, string baseDirectory, ContentOptions? options = null, string name = "model")

Parameters

file ReadOnlySpan<byte>

baseDirectory string

options ContentOptions?

name string

Returns

ModelData