Swapchain code cleanup
Use references instead of pointers
This commit is contained in:
parent
372cab5779
commit
dcec337fa9
12 changed files with 65 additions and 85 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Vulkan Example - Variable rate shading
|
||||
*
|
||||
* Copyright (C) 2020-2023 by Sascha Willems - www.saschawillems.de
|
||||
* Copyright (C) 2020-2024 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
|
|
@ -91,10 +91,9 @@ void VulkanExample::setupFrameBuffer()
|
|||
frameBufferCreateInfo.layers = 1;
|
||||
|
||||
// Create frame buffers for every swap chain image
|
||||
frameBuffers.resize(swapChain.imageCount);
|
||||
for (uint32_t i = 0; i < frameBuffers.size(); i++)
|
||||
{
|
||||
attachments[0] = swapChain.buffers[i].view;
|
||||
frameBuffers.resize(swapChain.images.size());
|
||||
for (uint32_t i = 0; i < frameBuffers.size(); i++) {
|
||||
attachments[0] = swapChain.imageViews[i];
|
||||
VK_CHECK_RESULT(vkCreateFramebuffer(device, &frameBufferCreateInfo, nullptr, &frameBuffers[i]));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue