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