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

Method create_command_buffers

framework/api_vulkan_sample.cpp:409–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void ApiVulkanSample::create_command_buffers()
410{
411 // Create one command buffer for each swap chain image and reuse for rendering
412 draw_cmd_buffers.resize(get_render_context().get_render_frames().size());
413
414 VkCommandBufferAllocateInfo allocate_info =
415 vkb::initializers::command_buffer_allocate_info(
416 cmd_pool,
417 VK_COMMAND_BUFFER_LEVEL_PRIMARY,
418 static_cast<uint32_t>(draw_cmd_buffers.size()));
419
420 VK_CHECK(vkAllocateCommandBuffers(get_device().get_handle(), &allocate_info, draw_cmd_buffers.data()));
421}
422
423void ApiVulkanSample::destroy_command_buffers()
424{

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
resizeMethod · 0.45
get_handleMethod · 0.45

Tested by

no test coverage detected