diff options
| author | s-ol <s+removethis@s-ol.nu> | 2021-03-31 13:53:23 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2021-03-31 15:49:39 +0000 |
| commit | 85909b2a9fc470d0f425fed5962bb8fc5a5fde57 (patch) | |
| tree | 1f99551d1cace6afe739d0b2f1644ad95cabcd5c /AssetLoader/interface | |
| parent | C API for GLTFLoader (diff) | |
| download | DiligentTools-85909b2a9fc470d0f425fed5962bb8fc5a5fde57.tar.gz DiligentTools-85909b2a9fc470d0f425fed5962bb8fc5a5fde57.zip | |
implement loading GLTF files from memory
Diffstat (limited to 'AssetLoader/interface')
| -rw-r--r-- | AssetLoader/interface/GLTFLoader.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/AssetLoader/interface/GLTFLoader.h b/AssetLoader/interface/GLTFLoader.h index 810a7c4..402559e 100644 --- a/AssetLoader/interface/GLTFLoader.h +++ b/AssetLoader/interface/GLTFLoader.h @@ -100,12 +100,39 @@ typedef enum GLTF_BUFFER_ID GLTF_BUFFER_ID; struct GLTF_TextureCacheType; typedef struct GLTF_TextureCacheType GLTF_TextureCacheType; +enum GLTF_FILE_TYPE +{ + GLTF_FILE_TYPE_UNKNOWN = 0, + GLTF_FILE_TYPE_ASCII, + GLTF_FILE_TYPE_BINARY, +}; +typedef enum GLTF_FILE_TYPE GLTF_FILE_TYPE; + /// Model create information struct IGLTFModelCreateInfo { /// File name + + /// If FileName is provided, Data member must be null const char* FileName DEFAULT_INITIALIZER(nullptr); + /// In-memory GLTF Data + + /// If Data is provided, FileName member must be null + const void* Data DEFAULT_INITIALIZER(nullptr); + + /// In-memory GLTF Data length + + /// Data size (in bytes) must be provided if Data is not null + size_t DataSize DEFAULT_INITIALIZER(0); + + /// File type + + /// If GLTF_FILE_TYPE_UNKNOWN and File name is provided, this + /// is detected based on the file extension (.gltf / .glb). + /// If Data is provided, this must not be GLTF_FILE_TYPE_UNKNOWN. + GLTF_FILE_TYPE FileType DEFAULT_INITIALIZER(GLTF_FILE_TYPE_UNKNOWN); + /// Optional texture cache to use when loading the model. /// The loader will try to find all the textures in the cache /// and add all new textures to the cache. |
