Let's see how we can use the Vulkan API in our Qt project to change the background color of the window. We'll cycle through all possible hues of the color while retaining constant saturation and lightness. This may sound complicated when you think about a color in RGB space, but it's actually very easy if you work with the HSL (Hue, Saturation, Lightness) color model. Luckily, QColor supports multiple color models, including HSL.
First, add and initialize the m_devFuncs private field, as just shown. Next, add the float m_hue private field that will hold the current hue of the background color. Set its initial value to zero. We can now start writing our startNextFrame() function that ...