コード例 #1
0
        internal unsafe void MarshalTo(Interop.PipelineViewportStateCreateInfo *pointer)
        {
            pointer->SType = StructureType.PipelineViewportStateCreateInfo;
            pointer->Next  = null;

            //Viewports
            if (this.Viewports != null)
            {
                pointer->Viewports = (Viewport *)Interop.HeapUtil.Allocate <Viewport>(this.Viewports.Length).ToPointer();
                for (int index = 0; index < this.Viewports.Length; index++)
                {
                    pointer->Viewports[index] = this.Viewports[index];
                }
            }
            else
            {
                pointer->Viewports = null;
            }

            //Scissors
            if (this.Scissors != null)
            {
                pointer->Scissors = (Rect2D *)Interop.HeapUtil.Allocate <Rect2D>(this.Scissors.Length).ToPointer();
                for (int index = 0; index < this.Scissors.Length; index++)
                {
                    pointer->Scissors[index] = this.Scissors[index];
                }
            }
            else
            {
                pointer->Scissors = null;
            }
            pointer->ViewportCount = (uint)(this.Viewports?.Length ?? 0);
            pointer->ScissorCount  = (uint)(this.Scissors?.Length ?? 0);
            pointer->Flags         = this.Flags;
        }
コード例 #2
0
ファイル: Structs.cs プロジェクト: yongweisun/VulkanSharp
 internal PipelineViewportStateCreateInfo(Interop.PipelineViewportStateCreateInfo* ptr)
 {
     m = ptr;
     Initialize ();
 }
コード例 #3
0
ファイル: Structs.cs プロジェクト: yongweisun/VulkanSharp
 public PipelineViewportStateCreateInfo()
 {
     m = (Interop.PipelineViewportStateCreateInfo*) Interop.Structure.Allocate (typeof (Interop.PipelineViewportStateCreateInfo));
     Initialize ();
 }