O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Vulkan types and functions

We can let Qt handle loading the Vulkan library and resolving functions for us. It works similar to the QOpenGLFunctions set of classes. Qt provides two functions classes for Vulkan:

  • The QVulkanFunctions class provides access to the Vulkan functions that are not device-specific
  • The QVulkanDeviceFunctions class provides functions that work on a specific VkDevice

You can obtain these objects by calling the functions() and deviceFunctions(VkDevice device) methods of the QVulkanInstance class, respectively. You will usually use the device functions a lot in the renderer, so a common pattern is to add the QVulkanDeviceFunctions *m_devFuncs private field to your renderer class and initialize it in the initResources() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required