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;
        }
Exemplo n.º 2
0
 internal PipelineViewportStateCreateInfo(Interop.PipelineViewportStateCreateInfo* ptr)
 {
     m = ptr;
     Initialize ();
 }
Exemplo n.º 3
0
 public PipelineViewportStateCreateInfo()
 {
     m = (Interop.PipelineViewportStateCreateInfo*) Interop.Structure.Allocate (typeof (Interop.PipelineViewportStateCreateInfo));
     Initialize ();
 }