Using Volk to load Vulkan functions and extensions
Volk is an open source library created by Arseny Kapoulkine that provides simple cross-platform support for loading Vulkan functions. The library provides several key features, the most important ones being automatically loading Vulkan’s function pointers and providing cross-platform support.
In this recipe, you will learn how to use Volk to load Vulkan functions and their extensions.
Getting ready
Download Volk from https://github.com/zeux/volk and add volk.c
to your project and enable the preprocessor defines for your platform, VK_USE_PLATFORM_WIN32_KHR
, VK_USE_PLATFORM_XLIB_KHR
, VK_USE_PLATFORM_MACOS_MVK
, and so on, before including volk.h
.
How to do it…
Volk automatically loads Vulkan’s function pointers, so you don’t have to manually handle the details of loading them and checking for available extensions. If you use Volk in your application, do not link against the static version of...