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

Implementing the image resource with optimal tiling

Optimal tiling is implemented through the staging buffer. First, a buffer resource object is created and stored with the raw image data contents. Next, the buffer resource data contents are copied to a newly created image object using the buffer-to-image copy command. The buffer-to-image copy command (vkCmdCopyBufferToImage) copies the buffer memory contents to the image memory.

In this section, we will implement the image resources using optimal tiling. In order to create an image resource with optimal tiling our user defined function VulkanRenderer::createTextureOptimal() can be used. This function takes parameters in the same way as the createTextureLinear() function:

void VulkanRenderer::createTextureOptimal(const ...

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