Commit 8db623c6

– refactoring: the GameState is now responsible for adding new objects
– refactoring: the renderer no longer directly adds/removes models but instead implicitly uses the current data from the ModelManager

A substantial refactor that can be summed up in some further bullet points:

  • We now use the GameState to load models, as such the addModel()/and removeModel() functions are removed from the renderer
  • They are being replaced by a function called synchroniseModel()
  • The concept of a state hash is added to the ObjectManager which calculates a unique hash for the current object state
  • The renderer also has a copy of the hash value, if they differ it knows it needs to update the Vulkan specific data structures to draw the new object/model state
  • The instantiation of the homely example scene (if you consider a bunch of chairs hovering over a bottomless void homely) moved from the renderer to the object manager

Leave a Reply

Your email address will not be published.