Skip to content

Commit

Permalink
Properly clear the model before loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ptc-tgamper committed Jul 5, 2024
1 parent 143ff45 commit fb58f88
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 fb58f88

Please sign in to comment.