Пример #1
0
        public static int SizeOfMarshalDirect(this VkMemoryAllocateInfo s)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            return
                (s.Next.SizeOfMarshalIndirect());
        }
Пример #2
0
        public static VkMemoryAllocateInfo.Raw *MarshalIndirect(this VkMemoryAllocateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkMemoryAllocateInfo.Raw *) 0);
            }
            var result = (VkMemoryAllocateInfo.Raw *)unmanaged;

            unmanaged += VkMemoryAllocateInfo.Raw.SizeInBytes;
            *result = s.MarshalDirect(ref unmanaged);
            return(result);
        }
Пример #3
0
        public static VkMemoryAllocateInfo.Raw MarshalDirect(this VkMemoryAllocateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            var pNext = s.Next.MarshalIndirect(ref unmanaged);

            VkMemoryAllocateInfo.Raw result;
            result.sType           = VkStructureType.MemoryAllocateInfo;
            result.pNext           = pNext;
            result.allocationSize  = s.AllocationSize;
            result.memoryTypeIndex = s.MemoryTypeIndex;
            return(result);
        }
Пример #4
0
 public static int SizeOfMarshalIndirect(this VkMemoryAllocateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkMemoryAllocateInfo.Raw.SizeInBytes;