Exemple #1
0
		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;
		}
Exemple #2
0
 private static QueueFamilyPropertiesExt GetQueueFamily(PhysicalDevice physicalDevice, SurfaceKhr surface)
 {
     return(physicalDevice.GetQueueFamilyPropertiesExt().First(q => q.SupportsGraphics && q.Supports(surface)));
 }
Exemple #3
0
 public MyQueueFamilyProperties[] GetQueueFamilyProperties()
 {
     return(_physicalDevice.GetQueueFamilyPropertiesExt().Select(q => new MyQueueFamilyProperties(q)).ToArray());
 }