MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / createDepthResources

Method createDepthResources

code/29_mipmapping.cpp:778–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776 }
777
778 void createDepthResources() {
779 VkFormat depthFormat = findDepthFormat();
780
781 createImage(swapChainExtent.width, swapChainExtent.height, 1, depthFormat, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, depthImage, depthImageMemory);
782 depthImageView = createImageView(depthImage, depthFormat, VK_IMAGE_ASPECT_DEPTH_BIT, 1);
783 }
784
785 VkFormat findSupportedFormat(const std::vector<VkFormat>& candidates, VkImageTiling tiling, VkFormatFeatureFlags features) {
786 for (VkFormat format : candidates) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected