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

            return
                (s.Next.SizeOfMarshalIndirect() +
                 s.Regions.SizeOfMarshalDirect());
        }
Beispiel #2
0
        public static VkPresentRegionsKHR.Raw *MarshalIndirect(this VkPresentRegionsKHR s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkPresentRegionsKHR.Raw *) 0);
            }
            var result = (VkPresentRegionsKHR.Raw *)unmanaged;

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

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

            VkPresentRegionsKHR.Raw result;
            result.sType          = VkStructureType.PresentRegionsKHR;
            result.pNext          = pNext;
            result.swapchainCount = s.Regions?.Count ?? 0;
            result.pRegions       = pRegions;
            return(result);
        }
Beispiel #4
0
 public static int SizeOfMarshalIndirect(this VkPresentRegionsKHR s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkPresentRegionsKHR.Raw.SizeInBytes;