internal unsafe void MarshalTo(Interop.GraphicsPipelineCreateInfo *pointer) { pointer->SType = StructureType.GraphicsPipelineCreateInfo; pointer->Next = null; //Stages if (this.Stages != null) { var fieldPointer = (Interop.PipelineShaderStageCreateInfo *)Interop.HeapUtil.AllocateAndClear <Interop.PipelineShaderStageCreateInfo>(this.Stages.Length); for (int index = 0; index < this.Stages.Length; index++) { this.Stages[index].MarshalTo(&fieldPointer[index]); } pointer->Stages = fieldPointer; } else { pointer->Stages = null; } pointer->VertexInputState = this.VertexInputState == null ? null : this.VertexInputState.Value.MarshalTo(); pointer->InputAssemblyState = this.InputAssemblyState == null ? null : this.InputAssemblyState.Value.MarshalTo(); pointer->TessellationState = this.TessellationState == null ? null : this.TessellationState.Value.MarshalTo(); pointer->ViewportState = this.ViewportState == null ? null : this.ViewportState.Value.MarshalTo(); pointer->RasterizationState = this.RasterizationState == null ? null : this.RasterizationState.Value.MarshalTo(); pointer->MultisampleState = this.MultisampleState == null ? null : this.MultisampleState.Value.MarshalTo(); pointer->DepthStencilState = this.DepthStencilState == null ? null : this.DepthStencilState.Value.MarshalTo(); pointer->ColorBlendState = this.ColorBlendState == null ? null : this.ColorBlendState.Value.MarshalTo(); pointer->DynamicState = this.DynamicState == null ? null : this.DynamicState.Value.MarshalTo(); this.Layout?.MarshalTo(&pointer->Layout); this.RenderPass?.MarshalTo(&pointer->RenderPass); this.BasePipelineHandle?.MarshalTo(&pointer->BasePipelineHandle); pointer->StageCount = (uint)(this.Stages?.Length ?? 0); pointer->Flags = this.Flags; pointer->Subpass = this.Subpass; pointer->BasePipelineIndex = this.BasePipelineIndex; }
internal GraphicsPipelineCreateInfo(Interop.GraphicsPipelineCreateInfo* ptr) { m = ptr; Initialize (); }
public GraphicsPipelineCreateInfo() { m = (Interop.GraphicsPipelineCreateInfo*) Interop.Structure.Allocate (typeof (Interop.GraphicsPipelineCreateInfo)); Initialize (); }