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

Method begin

framework/rendering/render_context.h:350–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348
349template <vkb::BindingType bindingType>
350inline std::shared_ptr<vkb::core::CommandBuffer<bindingType>> RenderContext<bindingType>::begin(vkb::CommandBufferResetMode reset_mode)
351{
352 assert(prepared && "HPPRenderContext not prepared for rendering, call prepare()");
353
354 if (!frame_active)
355 {
356 begin_frame();
357 }
358
359 if (!acquired_semaphore)
360 {
361 throw std::runtime_error("Couldn't begin frame");
362 }
363
364 const auto &queue = device.get_queue_by_flags(vk::QueueFlagBits::eGraphics, 0);
365 if constexpr (bindingType == vkb::BindingType::Cpp)
366 {
367 return get_active_frame().get_command_pool(queue, reset_mode).request_command_buffer();
368 }
369 else
370 {
371 return get_active_frame().get_command_pool(reinterpret_cast<vkb::Queue const &>(queue), reset_mode).request_command_buffer();
372 }
373}
374
375template <vkb::BindingType bindingType>
376inline void RenderContext<bindingType>::begin_frame()

Callers 8

operator!=Function · 0.45
recreateMethod · 0.45
recreate_swapchainMethod · 0.45
submit_implMethod · 0.45
allocate_lightsMethod · 0.45
transition_imagesMethod · 0.45
draw_implMethod · 0.45

Calls 1

Tested by

no test coverage detected