Пример #1
0
        public static int SizeOfMarshalDirect(this VkPipelineDepthStencilStateCreateInfo s)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            return
                (s.Next.SizeOfMarshalIndirect());
        }
Пример #2
0
        public static VkPipelineDepthStencilStateCreateInfo.Raw *MarshalIndirect(this VkPipelineDepthStencilStateCreateInfo s, ref byte *unmanaged)
        {
            if (s == null)
            {
                return((VkPipelineDepthStencilStateCreateInfo.Raw *) 0);
            }
            var result = (VkPipelineDepthStencilStateCreateInfo.Raw *)unmanaged;

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

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

            VkPipelineDepthStencilStateCreateInfo.Raw result;
            result.sType                 = VkStructureType.PipelineDepthStencilStateCreateInfo;
            result.pNext                 = pNext;
            result.flags                 = s.Flags;
            result.depthTestEnable       = new VkBool32(s.DepthTestEnable);
            result.depthWriteEnable      = new VkBool32(s.DepthWriteEnable);
            result.depthCompareOp        = s.DepthCompareOp;
            result.depthBoundsTestEnable = new VkBool32(s.DepthBoundsTestEnable);
            result.stencilTestEnable     = new VkBool32(s.StencilTestEnable);
            result.front                 = s.Front;
            result.back           = s.Back;
            result.minDepthBounds = s.MinDepthBounds;
            result.maxDepthBounds = s.MaxDepthBounds;
            return(result);
        }
Пример #4
0
 public static int SizeOfMarshalIndirect(this VkPipelineDepthStencilStateCreateInfo s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkPipelineDepthStencilStateCreateInfo.Raw.SizeInBytes;