Deleting nodes and merging scene graphs
Our scene-management routines from Chapter 7, Graphics Rendering Pipeline, are incomplete without a few more operations:
- Deleting scene nodes
- Merging multiple scenes into one (in our case, Lumberyard Bistro's exterior and interior objects)
- Merging material and mesh data lists
- Merging multiple static meshes with the same material into a large single mesh
These operations are crucial to the success of our final demo application since, without a combined list of render operations, we cannot easily construct auxiliary draw lists for shadow casters and transparent objects. Frustum culling is significantly easier to do while dealing with a single list of renderable items. Mesh merging is also essential for optimization purposes. The original Lumberyard Bistro scene contains a big tree in the backyard, where small orange and green leaves comprise almost two-thirds of the total draw call count of the entire scene—...