Vulkan-Samples icon indicating copy to clipboard operation
Vulkan-Samples copied to clipboard

WIP: Scene Graph, glTF loader and Image Loaders

Open TomAtkinsonArm opened this issue 3 years ago • 1 comments

Description

The previous scene graph required a lot of maintenance and was not flexible to an individual samples needs. It also allocated components using heap memory. This is ok for large amounts of data but for small components can quickly become inefficient. We also required implementing the component class which restricted how components could be used and what a component was.

On top of this, asset loading was done using RAII - in itself not a huge bad but this meant reusing asset loading logic was awkward. It is also harder to test the asset loading logic if it is buried inside a scene graph component.

Problems

  • Scene graph too restrictive
  • Asset loading hidden inside scene graph components
  • Heap allocations everywhere
  • Hard to add new components for a given scenario
  • glTF loader too confusing

Solutions

  • Replace scene graph with a simple node hierarchy
  • Nodes are created with a backing store (Registry)
  • Backing store using EnTT - Lots of active development, simplifies the rest of the scene graph a lot compared to the previous version, components are POD, we can perform updates using systems.
  • glTF loader simplified

TO DO

  • More tests are needed, I am not happy with the current amount, tests should highlight most of the initial bugs associated with asset loading
  • Readme for each component folder discussing techniques and decisions, possibly links to other learning resources
  • Clean up PR description

closes #435 closes #437

TomAtkinsonArm avatar May 30 '22 10:05 TomAtkinsonArm

test framework added to framework/v2.0. rebases and other fixes applied to this PR

TomAtkinsonArm avatar May 31 '22 19:05 TomAtkinsonArm