public MySwapchain CreateSwapChain(MySurface surface) { var surfaceFormat = _gpu.GetSurfaceFormats(surface).First(); var capabilities = _gpu.GetSurfaceCapabilities(surface); var swapChainExtent = capabilities.CurrentExtent; var presentMode = PresentModeKhr.Fifo; var numberOfSwapChainImages = capabilities.MinImageCount + 1; var swapchain = _device.CreateSwapchainKHR(new SwapchainCreateInfoKhr { Surface = surface.Handle, MinImageCount = numberOfSwapChainImages, ImageFormat = surfaceFormat.Format != Format.Undefined ? surfaceFormat.Format : Format.B8G8R8A8Unorm, }); }
public bool Supports(MySurface surface) { return(_queueFamilyPropertiesExt.Supports(surface.Handle)); }
public SurfaceCapabilitiesKhr GetSurfaceCapabilities(MySurface surface) { return(_physicalDevice.GetSurfaceCapabilitiesKHR(surface.Handle)); }
public SurfaceFormatKhr[] GetSurfaceFormats(MySurface surface) { return(_physicalDevice.GetSurfaceFormatsKHR(surface.Handle)); }