示例#1
0
        public static int SizeOfMarshalDirect(this VkMappedMemoryRange s)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            return
                (s.Next.SizeOfMarshalIndirect());
        }
示例#2
0
        public static VkMappedMemoryRange.Raw *MarshalIndirect(this VkMappedMemoryRange s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkMappedMemoryRange.Raw *) 0);
            }
            var result = (VkMappedMemoryRange.Raw *)unmanaged;

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

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

            VkMappedMemoryRange.Raw result;
            result.sType  = VkStructureType.MappedMemoryRange;
            result.pNext  = pNext;
            result.memory = s.Memory?.Handle ?? VkDeviceMemory.HandleType.Null;
            result.offset = s.Offset;
            result.size   = s.Size;
            return(result);
        }
示例#4
0
 public static int SizeOfMarshalIndirect(this VkMappedMemoryRange s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkMappedMemoryRange.Raw.SizeInBytes;