mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-15 06:45:54 +08:00
Merge pull request #122 from lebek/master
Fix incorrect index into bufferViews array
This commit is contained in:
commit
9d89f02cf0
@ -3488,7 +3488,8 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
|||||||
{
|
{
|
||||||
if (primitive.indices > -1) // has indices from parsing step, must be Element Array Buffer
|
if (primitive.indices > -1) // has indices from parsing step, must be Element Array Buffer
|
||||||
{
|
{
|
||||||
model->bufferViews[primitive.indices].target = TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER;
|
model->bufferViews[model->accessors[primitive.indices].bufferView]
|
||||||
|
.target = TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER;
|
||||||
// we could optionally check if acessors' bufferView type is Scalar, as it should be
|
// we could optionally check if acessors' bufferView type is Scalar, as it should be
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user