MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / default_create_func_impl

Method default_create_func_impl

framework/rendering/render_target.h:201–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199
200template <vkb::BindingType bindingType>
201inline std::unique_ptr<RenderTargetCpp> RenderTarget<bindingType>::default_create_func_impl(vkb::core::HPPImage &&swapchain_image)
202{
203 vk::Format depth_format = vkb::common::get_suitable_depth_format(swapchain_image.get_device().get_gpu().get_handle());
204
205 vkb::core::HPPImage depth_image{swapchain_image.get_device(), swapchain_image.get_extent(),
206 depth_format,
207 vk::ImageUsageFlagBits::eDepthStencilAttachment | vk::ImageUsageFlagBits::eTransientAttachment,
208 VMA_MEMORY_USAGE_GPU_ONLY};
209
210 std::vector<vkb::core::HPPImage> images;
211 images.push_back(std::move(swapchain_image));
212 images.push_back(std::move(depth_image));
213
214 return std::make_unique<RenderTargetCpp>(std::move(images));
215};
216
217template <vkb::BindingType bindingType>
218inline RenderTarget<bindingType>::RenderTarget(std::vector<ImageType> &&images)

Callers

nothing calls this directly

Calls 2

get_handleMethod · 0.45

Tested by

no test coverage detected