Finalizing the scene-converter tool
While the scene-node deletion routine from the previous recipe is useful for implementing interactive editors, we still need to automatically optimize our Lumberyard Bistro scene geometry. Here, we provide a few helper routines to merge multiple scenes into one. These routines and the code from the previous recipe allow us to complete the scene data-conversion tool that we started in Chapter 7, Graphics Rendering Pipeline.
Getting ready
Make sure you read the previous recipe, Deleting nodes and merging scene graphs.
The source code for this recipe is part of the Chapter7/SceneConverter
tool implemented in Chapter 7, Graphics Rendering Pipeline. Start exploring from the mergeBistro()
function and follow this recipe's text.
How to do it...
The first routine we need is the merging of multiple meshes into a single contiguous array. Since each MeshData
structure contains an array of triangle indices and an interleaved array of vertex...