Esempio n. 1
0
        private IReadOnlyList <IVkDisplayKHR> GetDisplayPlaneSupportedDisplaysKHR(int planeIndex)
        {
            if (Direct.GetDisplayPlaneSupportedDisplaysKHR == null)
            {
                return(new IVkDisplayKHR[0]);
            }
            int count;

            Direct.GetDisplayPlaneSupportedDisplaysKHR(Handle, planeIndex, &count, (VkDisplayKHR.HandleType *) 0);
            var resultArray = new VkDisplayKHR.HandleType[count];

            fixed(VkDisplayKHR.HandleType *pResultArray = resultArray)
            {
                Direct.GetDisplayPlaneSupportedDisplaysKHR(Handle, planeIndex, &count, pResultArray);
                return(resultArray.Select(GetDisplay).ToArray());
            }
        }
Esempio n. 2
0
 public IVkDisplayKHR GetDisplay(VkDisplayKHR.HandleType handle) =>
 displays.GetOrAdd(handle, h => new VkDisplayKHR(Instance, h));