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

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

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

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

            VkPipelineColorBlendStateCreateInfo.Raw result;
            result.sType           = VkStructureType.PipelineColorBlendStateCreateInfo;
            result.pNext           = pNext;
            result.flags           = s.Flags;
            result.logicOpEnable   = new VkBool32(s.LogicOpEnable);
            result.logicOp         = s.LogicOp;
            result.attachmentCount = s.Attachments?.Count ?? 0;
            result.pAttachments    = pAttachments;
            result.blendConstants  = s.BlendConstants;
            return(result);
        }
예제 #4
0
 public static int SizeOfMarshalIndirect(this VkPipelineColorBlendStateCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkPipelineColorBlendStateCreateInfo.Raw.SizeInBytes;