
3D Graphics Rendering Cookbook
By :

In Chapter 3, Getting Started with OpenGL and Vulkan, we learned how to render a textured 3D model on the screen using Vulkan in a direct and pretty ad hoc way. Now we will show how to move one step closer to creating a more scalable 3D model renderer with Vulkan. In the subsequent chapters, we will further generalize the rendering approach so that we can build a minimalistic Vulkan rendering engine from scratch, step by step.
Revisit the Organizing Vulkan frame rendering code recipe and recall how the RendererBase
interface works. The code we will discuss in this recipe can be found in shared/vkRenderers/VulkanModelRenderer.cpp
and the corresponding header file.
Let's declare the ModelRenderer
class, which contains a texture and combined vertex and index buffers:
class ModelRenderer: public RendererBase { public: ModelRenderer(VulkanRenderDevice...