Skip to content
Tech News
← Back to articles

Vulkan Tutorial

read original more articles
Why This Matters

Vulkan represents a significant advancement in graphics APIs, offering improved performance and cross-platform capabilities for developers willing to handle its complexity. Its design caters to high-performance graphics programming, making it a crucial tool for developers seeking maximum control and efficiency. However, its steep learning curve means it's best suited for experienced programmers focused on cutting-edge graphics work.

Key Takeaways

Introduction

Read before following this tutorial

This tutorial was written shortly after Vulkan was initially released, back in 2016. A lot has changed since then and this tutorial no longer reflects the best way to use Vulkan today. Instead of reading this website, I recommend to follow the guide or one of the tutorials linked here: https://vulkan.org/learn

About

This tutorial will teach you the basics of using the Vulkan graphics and compute API. Vulkan is a new API by the Khronos group (known for OpenGL) that provides a much better abstraction of modern graphics cards. This new interface allows you to better describe what your application intends to do, which can lead to better performance and less surprising driver behavior compared to existing APIs like OpenGL and Direct3D. The ideas behind Vulkan are similar to those of Direct3D 12 and Metal, but Vulkan has the advantage of being fully cross-platform and allows you to develop for Windows, Linux and Android at the same time.

However, the price you pay for these benefits is that you have to work with a significantly more verbose API. Every detail related to the graphics API needs to be set up from scratch by your application, including initial frame buffer creation and memory management for objects like buffers and texture images. The graphics driver will do a lot less hand holding, which means that you will have to do more work in your application to ensure correct behavior.

The takeaway message here is that Vulkan is not for everyone. It is targeted at programmers who are enthusiastic about high performance computer graphics, and are willing to put some work in. If you are more interested in game development, rather than computer graphics, then you may wish to stick to OpenGL or Direct3D, which will not be deprecated in favor of Vulkan anytime soon. Another alternative is to use an engine like Unreal Engine or Unity, which will be able to use Vulkan while exposing a much higher level API to you.

With that out of the way, let's cover some prerequisites for following this tutorial:

A graphics card and driver compatible with Vulkan (NVIDIA, AMD, Intel, Apple Silicon (Or the Apple M1))

Experience with C++ (familiarity with RAII, initializer lists)

... continue reading