Skip to content

Commit

Permalink
added fast path for loadmodel when no transformation or parenting was…
Browse files Browse the repository at this point in the history
… requested
  • Loading branch information
turanszkij committed Dec 21, 2021
1 parent 7823d71 commit 0cbef79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions WickedEngine/wiScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3911,6 +3911,12 @@ namespace wi::scene
// Serialize it from file:
scene.Serialize(archive);

if (!attached && XMMatrixIsIdentity(transformMatrix))
{
// fast path: no attaching, no tansformation, scene is loaded as-is
return INVALID_ENTITY;
}

// First, create new root:
Entity root = CreateEntity();
scene.transforms.Create(root);
Expand Down
2 changes: 1 addition & 1 deletion WickedEngine/wiVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 60;
// minor bug fixes, alterations, refactors, updates
const int revision = 3;
const int revision = 4;

const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);

Expand Down

0 comments on commit 0cbef79

Please sign in to comment.