O'Reilly logo

Learning Vulkan by Parminder Singh

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

Updating the descriptor set

Once the texture is prepared by linear or optimal tiling, it is just a matter of updating the descriptor set with the created image resource object. This is done in the implemented VulkanDrawable::createDescriptorSet() function. The input parameter useTexture must be true to support the texture. The following highlights a single-line change that is required in this function to support the texture.

When the useTexture parameter is true, the second VkWriteDescriptorSet element (with index 1) is populated with the texture information. Here are two things that are of utmost importance:

  • Setting the texture object: The pImageInfo field of VkWriteDescriptorSet must be set with the texture object's (TextureData) descsImgInfo ...

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