mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-18 09:56:00 +08:00
Add as-is flag to Image. Tentative solution for issue #82
This commit is contained in:
parent
3e53feb046
commit
e66d8c992f
@ -458,7 +458,14 @@ struct Image {
|
|||||||
Value extras;
|
Value extras;
|
||||||
ExtensionMap extensions;
|
ExtensionMap extensions;
|
||||||
|
|
||||||
Image() { bufferView = -1; }
|
// When this flag is true, data is stored to `image` in as-is format(e.g. jpeg compressed for "image/jpeg" mime)
|
||||||
|
// This feature is good if you use custom image loader function.
|
||||||
|
// (e.g. delayed decoding of images for faster glTF parsing)
|
||||||
|
// Default parser for Image does not provide as-is loading feature at the moment.
|
||||||
|
// (You can manipulate this by providing your own LoadImageData function)
|
||||||
|
bool as_is;
|
||||||
|
|
||||||
|
Image() : as_is(false) { bufferView = -1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Texture {
|
struct Texture {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user