Diligent Engine
Loading...
Searching...
No Matches
Diligent::GLTF::DocumentLoadInfo Struct Reference

GLTF document load information. More...

#include <GLTFDocument.hpp>

Public Attributes

const char * FileName = nullptr
FileExistsCallbackType FileExistsCallback = nullptr
ReadWholeFileCallbackType ReadWholeFileCallback = nullptr
TextureCacheType * pTextureCache = nullptr
 Optional texture cache to use when loading images referenced by the document.
ResourceManager * pResourceManager = nullptr
 Optional resource manager to use when loading images referenced by the document.
bool DecodeImages = true
bool ResolveExternalPaths = true

Detailed Description

GLTF document load information.

Member Data Documentation

◆ DecodeImages

bool Diligent::GLTF::DocumentLoadInfo::DecodeImages = true

Whether image data should be decoded into pixels while loading the document.

When this is false, the document still parses image and texture metadata. Images stored in buffer views remain addressable through tinygltf::Image::bufferView without duplicating their bytes in tinygltf::Image::image. External images are not read by the document loader, regardless of their URI or file extension, and remain addressable through tinygltf::Image::uri. Embedded data URI images are copied into tinygltf::Image::image as encoded image bytes because tinygltf supplies them through temporary callback storage.

◆ FileExistsCallback

FileExistsCallbackType Diligent::GLTF::DocumentLoadInfo::FileExistsCallback = nullptr

Optional callback function that will be called by the loader to check if the file exists. External file references have their GLTF URI escaping decoded once before path resolution. The callback must not percent-decode the resulting path again.

◆ FileName

const char* Diligent::GLTF::DocumentLoadInfo::FileName = nullptr

File path, or URI resolved by the file callbacks. The parser is selected from the document bytes, independently of the name. The name is preserved for callbacks and external-reference resolution.

◆ ReadWholeFileCallback

ReadWholeFileCallbackType Diligent::GLTF::DocumentLoadInfo::ReadWholeFileCallback = nullptr

Optional callback function that will be called by the loader to read the whole file. The root FileName is passed unchanged. External file paths use the same decoding convention as FileExistsCallback.

◆ ResolveExternalPaths

bool Diligent::GLTF::DocumentLoadInfo::ResolveExternalPaths = true

Resolve external file paths against the document directory and search the filesystem. Set false with custom file callbacks that perform their own resolution. Callbacks then receive decoded references without joining, expansion, or fallback searches. The initial FileName is passed unchanged in either mode.