/// <summary> /// Query the list of displays a plane supports. /// </summary> public Display[] GetDisplayPlaneSupportedDisplays(uint planeIndex) { unsafe { try { var commandDelegate = this.commandCache.GetCommandDelegate <Interop.vkGetDisplayPlaneSupportedDisplaysKHR>("vkGetDisplayPlaneSupportedDisplaysKHR", "instance"); Display[] result = default(Display[]); Result commandResult; uint displayCount; Interop.Display *marshalledDisplays = null; commandResult = commandDelegate(this.handle, planeIndex, &displayCount, null); if (SharpVkException.IsError(commandResult)) { throw SharpVkException.Create(commandResult); } marshalledDisplays = (Interop.Display *)Interop.HeapUtil.Allocate <Interop.Display>((uint)displayCount); commandResult = commandDelegate(this.handle, planeIndex, &displayCount, marshalledDisplays); if (SharpVkException.IsError(commandResult)) { throw SharpVkException.Create(commandResult); } result = new Display[(uint)displayCount]; for (int index = 0; index < (uint)displayCount; index++) { result[index] = new Display(marshalledDisplays[index], this.Allocator, this.commandCache); } return(result); } finally { Interop.HeapUtil.FreeLog(); } } }
internal unsafe void MarshalTo(Interop.Display *pointer) { *pointer = this.handle; }