コード例 #1
0
        public RenderPassAttachmentBeginInfoKHR
        (
            StructureType?sType     = StructureType.RenderPassAttachmentBeginInfo,
            void *pNext             = null,
            uint?attachmentCount    = null,
            ImageView *pAttachments = null
        ) : this()
        {
            if (sType is not null)
            {
                SType = sType.Value;
            }

            if (pNext is not null)
            {
                PNext = pNext;
            }

            if (attachmentCount is not null)
            {
                AttachmentCount = attachmentCount.Value;
            }

            if (pAttachments is not null)
            {
                PAttachments = pAttachments;
            }
        }
コード例 #2
0
        public FramebufferCreateInfo
        (
            StructureType?sType          = StructureType.FramebufferCreateInfo,
            void *pNext                  = null,
            FramebufferCreateFlags?flags = null,
            RenderPass?renderPass        = null,
            uint?attachmentCount         = null,
            ImageView *pAttachments      = null,
            uint?width  = null,
            uint?height = null,
            uint?layers = null
        ) : this()
        {
            if (sType is not null)
            {
                SType = sType.Value;
            }

            if (pNext is not null)
            {
                PNext = pNext;
            }

            if (flags is not null)
            {
                Flags = flags.Value;
            }

            if (renderPass is not null)
            {
                RenderPass = renderPass.Value;
            }

            if (attachmentCount is not null)
            {
                AttachmentCount = attachmentCount.Value;
            }

            if (pAttachments is not null)
            {
                PAttachments = pAttachments;
            }

            if (width is not null)
            {
                Width = width.Value;
            }

            if (height is not null)
            {
                Height = height.Value;
            }

            if (layers is not null)
            {
                Layers = layers.Value;
            }
        }
コード例 #3
0
 public RenderPassAttachmentBeginInfo
 (
     StructureType sType     = StructureType.RenderPassAttachmentBeginInfo,
     void *pNext             = default,
     uint attachmentCount    = default,
     ImageView *pAttachments = default
 )
 {
     SType           = sType;
     PNext           = pNext;
     AttachmentCount = attachmentCount;
     PAttachments    = pAttachments;
 }
コード例 #4
0
        public unsafe Auto <DisposableFramebuffer> Create(Vk api, CommandBufferScoped cbs, Auto <DisposableRenderPass> renderPass)
        {
            ImageView *attachments = stackalloc ImageView[_attachments.Length];

            for (int i = 0; i < _attachments.Length; i++)
            {
                attachments[i] = _attachments[i].Get(cbs).Value;
            }

            var framebufferCreateInfo = new FramebufferCreateInfo()
            {
                SType           = StructureType.FramebufferCreateInfo,
                RenderPass      = renderPass.Get(cbs).Value,
                AttachmentCount = (uint)_attachments.Length,
                PAttachments    = attachments,
                Width           = Width,
                Height          = Height,
                Layers          = Layers
            };

            api.CreateFramebuffer(_device, framebufferCreateInfo, null, out var framebuffer).ThrowOnError();
            return(new Auto <DisposableFramebuffer>(new DisposableFramebuffer(api, _device, framebuffer), null, _attachments));
        }
コード例 #5
0
 public FramebufferCreateInfo
 (
     StructureType sType          = StructureType.FramebufferCreateInfo,
     void *pNext                  = default,
     FramebufferCreateFlags flags = default,
     RenderPass renderPass        = default,
     uint attachmentCount         = default,
     ImageView *pAttachments      = default,
     uint width  = default,
     uint height = default,
     uint layers = default
 )
 {
     SType           = sType;
     PNext           = pNext;
     Flags           = flags;
     RenderPass      = renderPass;
     AttachmentCount = attachmentCount;
     PAttachments    = pAttachments;
     Width           = width;
     Height          = height;
     Layers          = layers;
 }