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

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

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

            var pNext      = s.Next.MarshalIndirect(ref unmanaged);
            var pViewports = s.Viewports.MarshalDirect(ref unmanaged);
            var pScissors  = s.Scissors.MarshalDirect(ref unmanaged);

            VkPipelineViewportStateCreateInfo.Raw result;
            result.sType         = VkStructureType.PipelineViewportStateCreateInfo;
            result.pNext         = pNext;
            result.flags         = s.Flags;
            result.viewportCount = s.Viewports?.Count ?? 0;
            result.pViewports    = pViewports;
            result.scissorCount  = s.Scissors?.Count ?? 0;
            result.pScissors     = pScissors;
            return(result);
        }
示例#4
0
 public static int SizeOfMarshalIndirect(this VkPipelineViewportStateCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkPipelineViewportStateCreateInfo.Raw.SizeInBytes;