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

Method update

framework/vulkan_sample.h:1656–1686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1654
1655template <vkb::BindingType bindingType>
1656inline void VulkanSample<bindingType>::update(float delta_time)
1657{
1658 vkb::Application::update(delta_time);
1659
1660 update_scene(delta_time);
1661
1662 update_gui(delta_time);
1663
1664 auto command_buffer = render_context->begin();
1665
1666 // Collect the performance data for the sample graphs
1667 update_stats(delta_time);
1668
1669 command_buffer->begin(vk::CommandBufferUsageFlagBits::eOneTimeSubmit);
1670 stats->begin_sampling(*command_buffer);
1671
1672 if constexpr (bindingType == BindingType::Cpp)
1673 {
1674 draw(*command_buffer, render_context->get_active_frame().get_render_target());
1675 }
1676 else
1677 {
1678 draw(reinterpret_cast<vkb::core::CommandBufferC &>(*command_buffer),
1679 reinterpret_cast<vkb::rendering::RenderTargetC &>(render_context->get_active_frame().get_render_target()));
1680 }
1681
1682 stats->end_sampling(*command_buffer);
1683 command_buffer->end();
1684
1685 render_context->submit(command_buffer);
1686}
1687
1688template <vkb::BindingType bindingType>
1689inline void VulkanSample<bindingType>::update_debug_window()

Callers 3

update_guiMethod · 0.45
update_sceneMethod · 0.45
update_statsMethod · 0.45

Calls 6

endMethod · 0.80
beginMethod · 0.45
begin_samplingMethod · 0.45
get_render_targetMethod · 0.45
end_samplingMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected