
Master Vulkan and modern C++ to build graphical 3D apps, render triangles, transform them, move data to the graphics card, and texture polygons across a Windows-based workflow in 12 sections.
Learn how to access general course information and get help, use Google and StackOverflow, and leverage FAQ and Q&A forums, with lifetime access and a shareable certificate.
Master the basics of Vulkan from instance creation to the swap chain, then build the graphics pipeline and render your first triangle with vertex, index, and uniform buffers and textures.
Install the Vulcan sdk by downloading the latest Windows installer, then use the default options and finish the setup.
This lesson guides you to verify your system can run Vulkan by ensuring the SDK is installed, generating a vulkaninfo html report, and confirming a physical device with presentable surfaces.
Install Visual Studio using the official installer, select the Desktop Development with C++ workload, and include the C++ CMake tools for Windows.
Install the Ninja build tool by downloading the Windows release from GitHub, extracting it, placing the executable in a project directory, and updating the system path.
Learn how to install cmake, either bundled with visual studio or separately for other ides, including downloading the windows x64 installer and adding cmake to the system path.
Install git, a source control system used to download dependencies for your project, by visiting the git scm page on google.com and completing the 64-bit Windows install with default options.
Set up a Vulkan Engine project with CMake in Visual Studio, create main.cpp, configure build files, and run hello world to verify the setup.
Configure cmake to locate vulkan, link the Vulkan library, and set include directories. Fetch glm and glfw with fetch_content and enable c++20 for building a Vulkan-based project.
Explore the number types used in this course, including std int 32, unsigned integers, size types, and eight‑bit characters. Learn how floating point types use the Cmath library’s std float.
Explore the Guideline Support Library (GSL) in a Vulkan and C++ workflow, showing how to clone, configure with CMake, link, and use GSL constructs like span and not_null.
Explain Google's c++ style guidelines, including snake_case, title case for structs and classes, and trailing underscores for members. Demonstrate using dot clang format and reformatting with ctrl k ctrl d.
Execute coding style overrides to improve readability, adjusting column limits, braces, and single-line blocks for inline getters/setters while exploring deviations from Google Style and handling Visual Studio warnings.
Set up EditorConfig to standardize C++ files with two-space indents, a trailing newline, trimmed spaces, and enable Visual Studio formatting except clang format.
Explore windows across Linux and Mac, including size, placement, title bars, and event handling, and learn to render frames using canvas with golf W for cross-platform graphics.
Initialize the GLFW library, create a window, apply the RAII pattern for resource management, and loop to poll events until the window closes.
Learn how to implement precompiled headers in a Vulkan C++ project to speed up builds by centralizing includes in precompiled.h and using CMake target_precompiled_headers.
Explore vectors and coordinate system with x and y components, using two- and three-value vectors to model points and directions, apply per-component operations; colors use rgb and alpha in Vulkan.
Explore how monitors use a top-left origin coordinate system from 0,0 to 1920 by 1080. Learn how multi-monitor layouts place the second display at 1920,0 to move windows between screens.
Learn to work with multiple monitors in Vulkan and C++, retrieving primary and other monitors, obtaining their positions, and centering a window using vector calculations and the work area.
Extract monitor functionality from the main function into a dedicated ofw monitor module, exposing get_monitors, get_monitor_position, get_monitor_work_area_size, and move_window_to_monitor to simplify code.
Create an RAII window class to encapsulate the UFW window in a Vulkan and C++ project, implementing constructor, destructor, get window size, should close, move to monitor, and handle access.
Adopt adding the precompiled header to every new source file to improve clarity of includes and reduce compile times, noting some platforms may not support it.
Prepare the window for Vulkan by disabling resize and setting the client API to no API, then begin the Vulkan lectures.
Explore how Vulkan serves as a specification for communicating with a graphical device. Write code that uses Vulkan drivers from Nvidia and AMD to render to the screen.
Explore the Vulkan architecture from instance and extensions with validation layers to physical and logical devices, surfaces, swap chains, graphics pipelines, command buffers, and memory buffers.
Create the Vulkan instance by implementing a graphics class that initializes application info and instance create info, retrieves required extensions, and manages the creation and destruction of the VkInstance.
Enumerate instance extension properties to determine available extensions before creating the Vulkan instance. Use the count-and-fetch pattern to fill a vector of properties and verify suggested extensions with a lambda.
Refactor by extracting lambdas into methods, add a string equal utility with header and cpp, and replace comparisons. Introduce a static row extensions supported function taking a span of extensions.
Implement an extension matches name function to compare vk extension properties and create is extension supported that binds extensions list and a name with bind_front, then run to verify success.
Create your own instance and learn how Vulcan works, calling Vulcan functions and creating structs for object creation and destruction. Next, explore getting messages from Vulcan to validate errors.
Enable and use validation layers in Vulkan to debug and improve your app, including requesting extensions, checking supported layers, and implementing a messenger for validation messages.
Learn how to add the spdlog (speedlock) logging library to a Vulkan and C++ project, configure cmake, and implement warning and error logging with formatted and colored output.
Set up a Vulkan debug messenger, including dynamic loading of the extension function, validating the messenger creation, and pairing create/destroy routines to ensure proper cleanup.
Add a glfw error callback to capture an error code and message and log the error before initialization, then verify debugging by correcting a deliberate init omission.
Organize vulkan code with Visual Studio regions to group functions like messenger and validation layers. Collapse regions for instance and extensions to improve navigation of constructor, destructor, and initialization calls.
Learn to use validation messages from Vulcan to diagnose code errors and explore requesting and calling extension functions for your projects. Next, prepare to work with the physical device.
Identify the physical devices that execute graphical commands, including GPUs, CPUs, and integrated chips with Vulkan support, and understand presentation support for rendering to the monitor.
Query Vulkan for physical devices, enumerate them, and select a suitable one using properties and features, printing device names and handling empty lists.
Filter Vulkan devices by queue families in C++, implementing a queue family indices struct with optional graphics and presentation indices, and identify suitable devices for rendering frames.
Create a logical device from the chosen physical device using a graphics queue from valid queue families and configure the features we will use.
Define a graphics queue field and retrieve it via the device queue call using the logical device and queue family index 0, with the VK no handle type.
Choose your Vulkan device and create command queues, and prepare to set up the swap chain that enables rendering to the window surface.
Begin a new section on the surface and presentation setup by creating the render surface inside the window and adding a VkSurfaceKHR field, with a CreateSurface implementation and cleanup.
Master swap chain creation by obtaining swap chain properties and evaluating surface capabilities. Select formats and present modes, and validate support with the is valid method.
Create the swap chain and pick surface format, present mode, and extent for Vulkan, using sRGB formats and mailbox or fifo modes, and clamp the extent to the window size.
Selects the swap chain format, mode, and extent, and sets the image count to enable double buffering for rendering frames.
Learn to retrieve swap chain images in Vulkan by resizing a VK image vector, obtaining surface formats, present modes, and extent, and calling vkGetSwapchainImages to fetch frames for rendering.
Create image views for swap chain images by configuring VkImageViewCreateInfo with 2D view type, color aspect, and identity swizzle, then create and manage their lifetimes.
Welcome
Vulkan is the newest and most popular graphics API out there. It is the successor of the already deprecated OpenGL, and it is the future for any kind of cross-platform graphical applications. It is extremely performant, which makes it perfect for game and game engine development.
With this course I aim to teach you the very basics of computer graphics with Vulkan in some short and simple lessons. I believe everyone can learn and it is especially important to have easy to understand chunks that can be consumed in short bursts.
This course will cover: setting up your C++ project, creating a window, initializing Vulkan, rendering a simple triangle, compiling shaders, debugging issues, rendering vertices, basic transformations for 3D.
I will not go as far as to teach complex topics like post-processing or shadows since the course aims to be short and accessible. The course will get regular updates, though that will cover any major changes in the specification.
The course is taught on Microsoft Windows, but most of the knowledge gained can be used on any platform.
Technologies Used
Vulkan SDK—the main topic of the course is the Vulkan graphics library specification. This is what "talks" to the GPU of your PC and renders any graphical information that you send to it.
GLFW—Abstracts handling windows so that we don't have to call native platform functions. This way the course would be mostly accessible to people on any platform.
GLM—A mathematical library that will help with the transformation of 3D information.
CMake—for managing and compiling the project. We will use a modern setup that is straightforward to understand and use.