mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-07-26 14:44:26 +08:00
Merge pull request #493 from ptc-tgamper/bug/model_clear_on_load
Properly clear the model before loading
This commit is contained in:
commit
fea6786129
12
tiny_gltf.h
12
tiny_gltf.h
@ -6108,16 +6108,8 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
model->buffers.clear();
|
// Reset the model
|
||||||
model->bufferViews.clear();
|
(*model) = Model();
|
||||||
model->accessors.clear();
|
|
||||||
model->meshes.clear();
|
|
||||||
model->cameras.clear();
|
|
||||||
model->nodes.clear();
|
|
||||||
model->extensionsUsed.clear();
|
|
||||||
model->extensionsRequired.clear();
|
|
||||||
model->extensions.clear();
|
|
||||||
model->defaultScene = -1;
|
|
||||||
|
|
||||||
// 1. Parse Asset
|
// 1. Parse Asset
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user