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

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

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

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

            VkCopyDescriptorSet.Raw result;
            result.sType           = VkStructureType.CopyDescriptorSet;
            result.pNext           = pNext;
            result.srcSet          = s.SrcSet?.Handle ?? VkDescriptorSet.HandleType.Null;
            result.srcBinding      = s.SrcBinding;
            result.srcArrayElement = s.SrcArrayElement;
            result.dstSet          = s.DstSet?.Handle ?? VkDescriptorSet.HandleType.Null;
            result.dstBinding      = s.DstBinding;
            result.dstArrayElement = s.DstArrayElement;
            result.descriptorCount = s.DescriptorCount;
            return(result);
        }
예제 #4
0
 public static int SizeOfMarshalIndirect(this VkCopyDescriptorSet s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkCopyDescriptorSet.Raw.SizeInBytes;