Don't allow empty URIs as two or more textures could stomp on eachother

This commit is contained in:
Mike Baran 2022-01-19 15:35:36 -05:00
parent a623f22dac
commit 22bdd2b7a0

View File

@ -331,6 +331,10 @@ void loadMeshPrimitive(
QImage qimg(img.image.data(), img.width, img.height, QImage::Format_RGBA8888);
if (!qimg.isNull()){
QImage copy = qimg.copy();
if (uri.empty())
{
uri = "texture_" + std::to_string(textureImg);
}
m.addTexture(uri, copy);
}
else {