42 capabilities(physicalDevice.getSurfaceCapabilitiesKHR(
Core::surface.get())),
43 formats(physicalDevice.getSurfaceFormatsKHR(
Core::surface.get())),
44 presentModes(physicalDevice.getSurfacePresentModesKHR(
Core::surface.get())) {
62 for (
const vk::SurfaceFormatKHR& format :
formats)
63 if (format.format == vk::Format::eR8G8B8A8Srgb && format.colorSpace == vk::ColorSpaceKHR::eSrgbNonlinear)
76 return vk::PresentModeKHR::eMailbox;
78 return vk::PresentModeKHR::eFifo;
86 if (
capabilities.currentExtent.width != std::numeric_limits<uint32_t>::max()) {
95 return vk::Extent2D{winSize.
x, winSize.
y};
Window & getWindow() noexcept
Vector2< A > cast() const
void clampTo(T minX, T maxX, T minY, T maxY)
std::vector< vk::SurfaceFormatKHR > formats
vk::SurfaceCapabilitiesKHR capabilities
vk::SurfaceFormatKHR chooseFormat() const
vk::Extent2D chooseSwapExtent() const
vk::PresentModeKHR choosePresentMode() const
std::vector< vk::PresentModeKHR > presentModes
SwapChainSupportDetails()
bool deviceIsAdequate() const
Vector2ui getSize() const