public void Initialize(IWindow window) { CreateSurface(window); NodeIndex = PhysicalDevice.GetQueueFamilyPropertiesExt() .First(q => q.SupportsGraphics && q.Supports(Surface)) .QueueIndex; var surfaceFormats = PhysicalDevice.GetSurfaceFormatsKHR(Surface); if (surfaceFormats.Length == 1 && surfaceFormats.First().Format == Format.Undefined) ColorFormat = Format.B8G8R8A8Unorm; else ColorFormat = surfaceFormats.First().Format; ColorSpace = surfaceFormats.First().ColorSpace; }
private static QueueFamilyPropertiesExt GetQueueFamily(PhysicalDevice physicalDevice, SurfaceKhr surface) { return(physicalDevice.GetQueueFamilyPropertiesExt().First(q => q.SupportsGraphics && q.Supports(surface))); }
public MyQueueFamilyProperties[] GetQueueFamilyProperties() { return(_physicalDevice.GetQueueFamilyPropertiesExt().Select(q => new MyQueueFamilyProperties(q)).ToArray()); }