| 832 | } |
| 833 | |
| 834 | void HPPApiVulkanSample::create_swapchain_buffers() |
| 835 | { |
| 836 | if (get_render_context().has_swapchain()) |
| 837 | { |
| 838 | auto &images = get_render_context().get_swapchain().get_images(); |
| 839 | |
| 840 | // Get the swap chain buffers containing the image and imageview |
| 841 | for (auto &swapchain_buffer : swapchain_buffers) |
| 842 | { |
| 843 | get_device().get_handle().destroyImageView(swapchain_buffer.view); |
| 844 | } |
| 845 | swapchain_buffers.clear(); |
| 846 | swapchain_buffers.reserve(images.size()); |
| 847 | for (auto &image : images) |
| 848 | { |
| 849 | swapchain_buffers.push_back( |
| 850 | {image, |
| 851 | vkb::common::create_image_view(get_device().get_handle(), image, vk::ImageViewType::e2D, get_render_context().get_swapchain().get_format())}); |
| 852 | } |
| 853 | } |
| 854 | else |
| 855 | { |
| 856 | auto &frames = get_render_context().get_render_frames(); |
| 857 | |
| 858 | // Get the swap chain buffers containing the image and imageview |
| 859 | swapchain_buffers.clear(); |
| 860 | swapchain_buffers.reserve(frames.size()); |
| 861 | for (auto &frame : frames) |
| 862 | { |
| 863 | auto &image_view = *frame->get_render_target().get_views().begin(); |
| 864 | swapchain_buffers.push_back({image_view.get_image().get_handle(), image_view.get_handle()}); |
| 865 | } |
| 866 | } |
| 867 | } |
| 868 | |
| 869 | void HPPApiVulkanSample::update_swapchain_image_usage_flags(std::set<vk::ImageUsageFlagBits> const &image_usage_flags) |
| 870 | { |
nothing calls this directly
no test coverage detected