MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / prepare_framebuffers

Method prepare_framebuffers

cube/cube.cpp:2572–2587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2570}
2571
2572void Demo::prepare_framebuffers() {
2573 std::array<vk::ImageView, 2> attachments;
2574 attachments[1] = depth.view;
2575
2576 for (auto &swapchain_image_resource : swapchain_resources) {
2577 attachments[0] = swapchain_image_resource.view;
2578 auto const framebuffer_return = device.createFramebuffer(vk::FramebufferCreateInfo()
2579 .setRenderPass(render_pass)
2580 .setAttachments(attachments)
2581 .setWidth(width)
2582 .setHeight(height)
2583 .setLayers(1));
2584 VERIFY(framebuffer_return.result == vk::Result::eSuccess);
2585 swapchain_image_resource.framebuffer = framebuffer_return.value;
2586 }
2587}
2588
2589void Demo::prepare_submission_sync_objects() {
2590 // Create semaphores to synchronize acquiring presentable buffers before

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected