public static VkImageCreateInfo.Raw MarshalDirect(this VkImageCreateInfo s, ref byte *unmanaged) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } var pNext = s.Next.MarshalIndirect(ref unmanaged); var pQueueFamilyIndices = s.QueueFamilyIndices.MarshalDirect(ref unmanaged); VkImageCreateInfo.Raw result; result.sType = VkStructureType.ImageCreateInfo; result.pNext = pNext; result.flags = s.Flags; result.imageType = s.ImageType; result.format = s.Format; result.extent = s.Extent; result.mipLevels = s.MipLevels; result.arrayLayers = s.ArrayLayers; result.samples = s.Samples; result.tiling = s.Tiling; result.usage = s.Usage; result.sharingMode = s.SharingMode; result.queueFamilyIndexCount = s.QueueFamilyIndices?.Count ?? 0; result.pQueueFamilyIndices = pQueueFamilyIndices; result.initialLayout = s.InitialLayout; return(result); }
public static int SizeOfMarshalDirect(this VkImageCreateInfo s) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } return (s.Next.SizeOfMarshalIndirect() + s.QueueFamilyIndices.SizeOfMarshalDirect()); }
public static VkImageCreateInfo.Raw *MarshalIndirect(this VkImageCreateInfo s, ref byte *unmanaged) { if (s == null) { return((VkImageCreateInfo.Raw *) 0); } var result = (VkImageCreateInfo.Raw *)unmanaged; unmanaged += VkImageCreateInfo.Raw.SizeInBytes; *result = s.MarshalDirect(ref unmanaged); return(result); }
public static int SizeOfMarshalIndirect(this VkImageCreateInfo s) => s == null ? 0 : s.SizeOfMarshalDirect() + VkImageCreateInfo.Raw.SizeInBytes;