예제 #1
0
        internal unsafe void MarshalTo(Interop.SubpassDescription *pointer)
        {
            //InputAttachments
            if (this.InputAttachments != null)
            {
                pointer->InputAttachments = (AttachmentReference *)Interop.HeapUtil.Allocate <AttachmentReference>(this.InputAttachments.Length).ToPointer();
                for (int index = 0; index < this.InputAttachments.Length; index++)
                {
                    pointer->InputAttachments[index] = this.InputAttachments[index];
                }
            }
            else
            {
                pointer->InputAttachments = null;
            }

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

            //ResolveAttachments
            if (this.ResolveAttachments != null)
            {
                pointer->ResolveAttachments = (AttachmentReference *)Interop.HeapUtil.Allocate <AttachmentReference>(this.ResolveAttachments.Length).ToPointer();
                for (int index = 0; index < this.ResolveAttachments.Length; index++)
                {
                    pointer->ResolveAttachments[index] = this.ResolveAttachments[index];
                }
            }
            else
            {
                pointer->ResolveAttachments = null;
            }
            pointer->DepthStencilAttachment = (AttachmentReference *)Interop.HeapUtil.Allocate <AttachmentReference>();
            *pointer->DepthStencilAttachment = this.DepthStencilAttachment;
            pointer->PreserveAttachments     = this.PreserveAttachments == null ? null : Interop.HeapUtil.MarshalTo(this.PreserveAttachments);
            pointer->InputAttachmentCount    = (uint)(this.InputAttachments?.Length ?? 0);
            pointer->ColorAttachmentCount    = (uint)(this.ColorAttachments?.Length ?? 0);
            pointer->PreserveAttachmentCount = (uint)(this.PreserveAttachments?.Length ?? 0);
            pointer->Flags             = this.Flags;
            pointer->PipelineBindPoint = this.PipelineBindPoint;
        }
예제 #2
0
 internal SubpassDescription(Interop.SubpassDescription* ptr)
 {
     m = ptr;
 }
예제 #3
0
 public SubpassDescription()
 {
     m = (Interop.SubpassDescription*) Interop.Structure.Allocate (typeof (Interop.SubpassDescription));
 }