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

Method prepare_gui

framework/api_vulkan_sample.cpp:81–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void ApiVulkanSample::prepare_gui()
82{
83 create_gui(*window, nullptr, 15.0f, true);
84
85 std::vector<VkPipelineShaderStageCreateInfo> shader_stages = {
86 load_shader("uioverlay/uioverlay.vert.spv", VK_SHADER_STAGE_VERTEX_BIT),
87 load_shader("uioverlay/uioverlay.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT)};
88
89 if (uses_dynamic_rendering())
90 {
91 VkFormat color_format = get_render_context().get_swapchain().get_format();
92 VkFormat depth_fmt = VK_FORMAT_UNDEFINED;
93 get_gui().prepare(pipeline_cache, color_format, depth_fmt, shader_stages);
94 }
95 else
96 {
97 get_gui().prepare(pipeline_cache, render_pass, shader_stages, get_gui_subpass());
98 }
99}
100
101void ApiVulkanSample::update(float delta_time)
102{

Callers

nothing calls this directly

Calls 3

load_shaderFunction · 0.50
get_formatMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected