Refactoring indirect rendering
In Chapter 8, we introduced the VKMesh
helper class, which provided a straightforward way to encapsulate scene geometry, GPU buffers, and rendering pipelines. This class has been useful in simplifying rendering tasks throughout Chapters 8 to 10. However, its simplicity comes with a trade-off: it tightly couples scene data, rendering pipelines, and buffers.
This strong coupling poses challenges when attempting to render the same scene data with different pipelines or when selectively rendering parts of a scene. To address these limitations, let’s introduce a new class, VKMesh11
, designed to resolve these issues and enable more flexible rendering setups. With VKMesh11
, we will have the new foundation needed to implement more advanced and complex algorithms in this chapter.
Getting ready
As we build on top of the old VKMesh
class, ensure you’ve reviewed all the recipes in Chapter 8 to understand how the old VKMesh
class works...