mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-15 01:05:57 +08:00
Merge pull request #281 from rbsheth/sparse_morph_fix
Fix sparse morph targets
This commit is contained in:
commit
7842c1276f
10
tiny_gltf.h
10
tiny_gltf.h
@ -5709,10 +5709,12 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
|||||||
|
|
||||||
for (auto &target : primitive.targets) {
|
for (auto &target : primitive.targets) {
|
||||||
for (auto &attribute : target) {
|
for (auto &attribute : target) {
|
||||||
model
|
auto bufferView =
|
||||||
->bufferViews[size_t(
|
model->accessors[size_t(attribute.second)].bufferView;
|
||||||
model->accessors[size_t(attribute.second)].bufferView)]
|
if (bufferView > 0) {
|
||||||
.target = TINYGLTF_TARGET_ARRAY_BUFFER;
|
model->bufferViews[size_t(bufferView)].target =
|
||||||
|
TINYGLTF_TARGET_ARRAY_BUFFER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user