mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 23:35:54 +08:00
Merge branch 'devel' into generic_extension_support
This commit is contained in:
commit
85b3cbc44d
12
tiny_gltf.h
12
tiny_gltf.h
@ -1759,7 +1759,12 @@ static bool ParseImage(Image *image, std::string *err, const json &o,
|
||||
if (IsDataURI(uri)) {
|
||||
loaded = DecodeDataURI(&img, uri, 0, false);
|
||||
} else {
|
||||
// Assume external .bin file.
|
||||
// Assume external file
|
||||
// Keep texture path (for textures that cannot be decoded)
|
||||
image->uri = uri;
|
||||
#ifdef TINYGLTF_NO_EXTERNAL_IMAGE
|
||||
return true;
|
||||
#endif
|
||||
loaded = LoadExternalFile(&img, err, uri, basedir, 0, false);
|
||||
}
|
||||
|
||||
@ -1807,10 +1812,11 @@ static bool ParseImage(Image *image, std::string *err, const json &o,
|
||||
}
|
||||
} else {
|
||||
// Assume external file
|
||||
|
||||
// Keep texture path (for textures that cannot be decoded)
|
||||
image->uri = uri;
|
||||
|
||||
#ifdef TINYGLTF_NO_EXTERNAL_IMAGE
|
||||
return true;
|
||||
#endif
|
||||
if (!LoadExternalFile(&img, err, uri, basedir, 0, false)) {
|
||||
if (err) {
|
||||
(*err) += "Failed to load external 'uri' for image parameter\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user