/// <summary>
        ///
        /// </summary>
        internal static unsafe PhysicalDeviceMemoryProperties MarshalFrom(SharpVk.Interop.PhysicalDeviceMemoryProperties *pointer)
        {
            PhysicalDeviceMemoryProperties result = default(PhysicalDeviceMemoryProperties);

            if (pointer->MemoryTypeCount != 0)
            {
                var fieldPointer = new SharpVk.MemoryType[(uint)(pointer->MemoryTypeCount)];
                for (int index = 0; index < (uint)(pointer->MemoryTypeCount); index++)
                {
                    fieldPointer[index] = (&(pointer->MemoryTypes_0))[index];
                }
                result.MemoryTypes = fieldPointer;
            }
            else
            {
                result.MemoryTypes = null;
            }
            if (pointer->MemoryHeapCount != 0)
            {
                var fieldPointer = new SharpVk.MemoryHeap[(uint)(pointer->MemoryHeapCount)];
                for (int index = 0; index < (uint)(pointer->MemoryHeapCount); index++)
                {
                    fieldPointer[index] = (&(pointer->MemoryHeaps_0))[index];
                }
                result.MemoryHeaps = fieldPointer;
            }
            else
            {
                result.MemoryHeaps = null;
            }
            return(result);
        }
Exemplo n.º 2
0
 public static extern void vkGetPhysicalDeviceMemoryProperties(SharpVk.Interop.PhysicalDevice physicalDevice, SharpVk.Interop.PhysicalDeviceMemoryProperties *memoryProperties);