mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 13:26:30 -05:00
renderer_vulkan/wrapper: Add swapchain handle
This commit is contained in:
parent
7fe52ef77f
commit
11774308d3
2 changed files with 15 additions and 0 deletions
|
@ -460,4 +460,12 @@ CommandBuffers CommandPool::Allocate(std::size_t num_buffers, VkCommandBufferLev
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<VkImage> SwapchainKHR::GetImages() const {
|
||||||
|
u32 num;
|
||||||
|
Check(dld->vkGetSwapchainImagesKHR(owner, handle, &num, nullptr));
|
||||||
|
std::vector<VkImage> images(num);
|
||||||
|
Check(dld->vkGetSwapchainImagesKHR(owner, handle, &num, images.data()));
|
||||||
|
return images;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Vulkan::vk
|
} // namespace Vulkan::vk
|
||||||
|
|
|
@ -647,4 +647,11 @@ public:
|
||||||
VkCommandBufferLevel level = VK_COMMAND_BUFFER_LEVEL_PRIMARY) const;
|
VkCommandBufferLevel level = VK_COMMAND_BUFFER_LEVEL_PRIMARY) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class SwapchainKHR : public Handle<VkSwapchainKHR, VkDevice, DeviceDispatch> {
|
||||||
|
using Handle<VkSwapchainKHR, VkDevice, DeviceDispatch>::Handle;
|
||||||
|
|
||||||
|
public:
|
||||||
|
std::vector<VkImage> GetImages() const;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace Vulkan::vk
|
} // namespace Vulkan::vk
|
||||||
|
|
Loading…
Reference in a new issue