renderer_vulkan/wrapper: Add swapchain handle
This commit is contained in:
parent
7fe52ef77f
commit
11774308d3
@ -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 New Issue
Block a user