mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-16 14:16:03 +08:00
Fix incorrect component type shown in warning message
This commit is contained in:
parent
4b9cfc8c1e
commit
c35819f0b7
@ -4926,13 +4926,13 @@ static bool ParseDracoExtension(Primitive *primitive, Model *model,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (supposedComponentType > model->accessors[primitive->indices].componentType) {
|
if (supposedComponentType > model->accessors[primitive->indices].componentType) {
|
||||||
model->accessors[primitive->indices].componentType = supposedComponentType;
|
|
||||||
if (warn) {
|
if (warn) {
|
||||||
(*warn) +=
|
(*warn) +=
|
||||||
"GLTF component type " + std::to_string(model->accessors[primitive->indices].componentType) +
|
"GLTF component type " + std::to_string(model->accessors[primitive->indices].componentType) +
|
||||||
" is not sufficient for number of stored points,"
|
" is not sufficient for number of stored points,"
|
||||||
" treating as " + std::to_string(supposedComponentType) + "\n";
|
" treating as " + std::to_string(supposedComponentType) + "\n";
|
||||||
}
|
}
|
||||||
|
model->accessors[primitive->indices].componentType = supposedComponentType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user