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

Method handle_surface_changes

framework/hpp_api_vulkan_sample.cpp:876–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874}
875
876void HPPApiVulkanSample::handle_surface_changes()
877{
878 vk::SurfaceCapabilitiesKHR surface_properties =
879 get_device().get_gpu().get_handle().getSurfaceCapabilitiesKHR(get_render_context().get_swapchain().get_surface());
880
881 if (surface_properties.currentExtent != get_render_context().get_surface_extent() &&
882 surface_properties.currentExtent != vk::Extent2D{0xFFFFFFFF, 0xFFFFFFFF})
883 {
884 resize(surface_properties.currentExtent.width, surface_properties.currentExtent.height);
885 }
886}
887
888vk::ImageLayout HPPApiVulkanSample::descriptor_type_to_image_layout(vk::DescriptorType descriptor_type, vk::Format format) const
889{

Callers 1

resizeMethod · 0.45

Calls 2

get_handleMethod · 0.45
get_surfaceMethod · 0.45

Tested by

no test coverage detected