コード例 #1
0
ファイル: PhysicalDevice.gen.cs プロジェクト: yaram/SharpVk
 /// <summary>
 /// Returns properties of available physical device layers.
 /// </summary>
 public unsafe SharpVk.LayerProperties[] EnumerateDeviceLayerProperties()
 {
     try
     {
         SharpVk.LayerProperties[] result = default(SharpVk.LayerProperties[]);
         uint propertyCount = default(uint);
         SharpVk.Interop.LayerProperties *marshalledProperties = default(SharpVk.Interop.LayerProperties *);
         SharpVk.Interop.VkPhysicalDeviceEnumerateDeviceLayerPropertiesDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.VkPhysicalDeviceEnumerateDeviceLayerPropertiesDelegate>("vkEnumerateDeviceLayerProperties", "");
         Result methodResult = commandDelegate(this.handle, &propertyCount, marshalledProperties);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         marshalledProperties = (SharpVk.Interop.LayerProperties *)(Interop.HeapUtil.Allocate <SharpVk.Interop.LayerProperties>((uint)(propertyCount)));
         commandDelegate(this.handle, &propertyCount, marshalledProperties);
         if (marshalledProperties != null)
         {
             var fieldPointer = new SharpVk.LayerProperties[(uint)(propertyCount)];
             for (int index = 0; index < (uint)(propertyCount); index++)
             {
                 fieldPointer[index] = SharpVk.LayerProperties.MarshalFrom(&marshalledProperties[index]);
             }
             result = fieldPointer;
         }
         else
         {
             result = null;
         }
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
コード例 #2
0
ファイル: Instance.gen.cs プロジェクト: yongweisun/SharpVk
 /// <summary>
 /// Returns up to requested number of global layer properties.
 /// </summary>
 public static unsafe SharpVk.LayerProperties[] EnumerateLayerProperties()
 {
     try
     {
         SharpVk.LayerProperties[] result = default(SharpVk.LayerProperties[]);
         uint propertyCount = default(uint);
         SharpVk.Interop.LayerProperties *marshalledProperties = default(SharpVk.Interop.LayerProperties *);
         Result methodResult = Interop.Commands.vkEnumerateInstanceLayerProperties(&propertyCount, marshalledProperties);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         marshalledProperties = (SharpVk.Interop.LayerProperties *)(Interop.HeapUtil.Allocate <SharpVk.Interop.LayerProperties>((uint)(propertyCount)));
         Interop.Commands.vkEnumerateInstanceLayerProperties(&propertyCount, marshalledProperties);
         if (marshalledProperties != null)
         {
             var fieldPointer = new SharpVk.LayerProperties[(uint)(propertyCount)];
             for (int index = 0; index < (uint)(propertyCount); index++)
             {
                 fieldPointer[index] = SharpVk.LayerProperties.MarshalFrom(&marshalledProperties[index]);
             }
             result = fieldPointer;
         }
         else
         {
             result = null;
         }
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        internal static unsafe LayerProperties MarshalFrom(SharpVk.Interop.LayerProperties *pointer)
        {
            LayerProperties result = default(LayerProperties);

            result.LayerName             = Interop.HeapUtil.MarshalStringFrom(pointer->LayerName, Constants.MaxExtensionNameSize, true);
            result.SpecVersion           = (Version)(pointer->SpecVersion);
            result.ImplementationVersion = (Version)(pointer->ImplementationVersion);
            result.Description           = Interop.HeapUtil.MarshalStringFrom(pointer->Description, Constants.MaxDescriptionSize, true);
            return(result);
        }
コード例 #4
0
 public static extern SharpVk.Result vkEnumerateDeviceLayerProperties(SharpVk.Interop.PhysicalDevice physicalDevice, uint *propertyCount, SharpVk.Interop.LayerProperties *properties);
コード例 #5
0
 public static extern SharpVk.Result vkEnumerateInstanceLayerProperties(uint *propertyCount, SharpVk.Interop.LayerProperties *properties);