Interrupt / delverengine

Delver game engine and editor
zlib License
803 stars 81 forks source link

Stop mesh item from newing up drawable every frame #133

Closed joshuaskelly closed 4 years ago

joshuaskelly commented 4 years ago

Summary

Due to a small logic error, we were newing up a mesh drawable every frame for mesh items. The fix was:

  1. Split out the case for if meshToUse was null or not.
  2. Put the check to see if our mesh needs updating inside the previous check.
  3. Actually record the lastMeshFile and lastTextureFile values.
  4. Use String.equals() for sting equality checks.