Merge pull request #240 from kacprzak/master

Set target for bufferView used by MorphTargets
This commit is contained in:
Syoyo Fujita 2020-01-22 22:32:41 +09:00 committed by GitHub
commit 57356933c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5570,6 +5570,13 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
model->bufferViews[size_t(model->accessors[size_t(attribute.second)].bufferView)] model->bufferViews[size_t(model->accessors[size_t(attribute.second)].bufferView)]
.target = TINYGLTF_TARGET_ARRAY_BUFFER; .target = TINYGLTF_TARGET_ARRAY_BUFFER;
} }
for(auto &target : primitive.targets) {
for(auto &attribute : target) {
model->bufferViews[size_t(model->accessors[size_t(attribute.second)].bufferView)]
.target = TINYGLTF_TARGET_ARRAY_BUFFER;
}
}
} }
} }