Skip to content

Commit

Permalink
Merge pull request #493 from ptc-tgamper/bug/model_clear_on_load
Browse files Browse the repository at this point in the history
Properly clear the model before loading
  • Loading branch information
syoyo authored Jul 5, 2024
2 parents 143ff45 + fb58f88 commit fea6786
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tiny_gltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -6108,16 +6108,8 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
}
}

model->buffers.clear();
model->bufferViews.clear();
model->accessors.clear();
model->meshes.clear();
model->cameras.clear();
model->nodes.clear();
model->extensionsUsed.clear();
model->extensionsRequired.clear();
model->extensions.clear();
model->defaultScene = -1;
// Reset the model
(*model) = Model();

// 1. Parse Asset
{
Expand Down

0 comments on commit fea6786

Please sign in to comment.