Create a fallback PNG, not GIF. GIF is not valid glTF.
This commit is contained in:
parent
3bb9104fe3
commit
640712c6e1
|
@ -604,8 +604,11 @@ ModelData *Raw2Gltf(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!image) {
|
if (!image) {
|
||||||
// fallback is tiny transparent gif
|
// fallback is tiny transparent PNG
|
||||||
image = new ImageData(textureName, "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=");
|
image = new ImageData(
|
||||||
|
textureName,
|
||||||
|
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<TextureData> texDat = gltf->textures.hold(
|
std::shared_ptr<TextureData> texDat = gltf->textures.hold(
|
||||||
|
|
Loading…
Reference in New Issue