To get the most out of this book
You’ll need a machine that supports Vulkan 1.3 with the latest GPU drivers. All code examples in this book have been tested with Vulkan SDK 1.4.304.1, using Visual Studio 2022 on Windows 10 and 11, and GCC 12 on Ubuntu. While macOS is not officially supported, its users should be able to run some very first demos from this book.
Download the example code files
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/3D-Graphics-Rendering-Cookbook-Second-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781803248110_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: “In OpenGL, presenting an offscreen buffer to the visible area of a window is done using system-dependent functions, such as wglSwapBuffers()
on Windows, eglSwapBuffers()
on OpenGL ES embedded systems, glXSwapBuffers()
on Linux, or automatically on macOS. Vulkan, however, gives us much more fine-grained control.”
A block of code is set as follows:
while (!glfwWindowShouldClose(window)) {
glfwPollEvents();
glfwGetFramebufferSize(window, &width, &height);
if (!width || !height) continue;
lvk::ICommandBuffer& buf = ctx->acquireCommandBuffer();
ctx->submit(buf, ctx->getCurrentSwapchainTexture());
}
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Here, we use the SPIRV-Reflect library to introspect the SPIR-V code and retrieve the size of the push constants from it.”
Warnings or important notes appear like this.
Tips and tricks appear like this.