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

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

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

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

            VkCommandBufferAllocateInfo.Raw result;
            result.sType              = VkStructureType.CommandBufferAllocateInfo;
            result.pNext              = pNext;
            result.commandPool        = s.CommandPool?.Handle ?? VkCommandPool.HandleType.Null;
            result.level              = s.Level;
            result.commandBufferCount = s.CommandBufferCount;
            return(result);
        }
コード例 #4
0
 public static int SizeOfMarshalIndirect(this VkCommandBufferAllocateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkCommandBufferAllocateInfo.Raw.SizeInBytes;