Beispiel #1
0
        internal static unsafe DisplayPlaneProperties MarshalFrom(Interop.DisplayPlaneProperties *value)
        {
            DisplayPlaneProperties result = new DisplayPlaneProperties();

            result.CurrentStackIndex = value->CurrentStackIndex;
            return(result);
        }
Beispiel #2
0
 /// <summary>
 /// Query the plane properties.
 /// </summary>
 public DisplayPlaneProperties[] GetDisplayPlaneProperties()
 {
     unsafe
     {
         try
         {
             var commandDelegate             = this.commandCache.GetCommandDelegate <Interop.vkGetPhysicalDeviceDisplayPlanePropertiesKHR>("vkGetPhysicalDeviceDisplayPlanePropertiesKHR", "instance");
             DisplayPlaneProperties[] result = default(DisplayPlaneProperties[]);
             Result commandResult;
             uint   propertyCount;
             Interop.DisplayPlaneProperties *marshalledProperties = null;
             commandResult = commandDelegate(this.handle, &propertyCount, null);
             if (SharpVkException.IsError(commandResult))
             {
                 throw SharpVkException.Create(commandResult);
             }
             marshalledProperties = (Interop.DisplayPlaneProperties *)Interop.HeapUtil.Allocate <Interop.DisplayPlaneProperties>((uint)propertyCount);
             commandResult        = commandDelegate(this.handle, &propertyCount, marshalledProperties);
             if (SharpVkException.IsError(commandResult))
             {
                 throw SharpVkException.Create(commandResult);
             }
             result = new DisplayPlaneProperties[(uint)propertyCount];
             for (int index = 0; index < (uint)propertyCount; index++)
             {
                 result[index] = DisplayPlaneProperties.MarshalFrom(&marshalledProperties[index]);
             }
             return(result);
         }
         finally
         {
             Interop.HeapUtil.FreeLog();
         }
     }
 }