unsafe void Create(RenderPass renderPass, uint width, uint height, uint layers, ReadOnlySpan <VkImageView> attachments, VkFramebufferCreateFlags flags = 0) { fixed(VkImageView *attachmentsPtr = attachments) { var framebufferCreateInfo = new VkFramebufferCreateInfo { sType = VkStructureType.FramebufferCreateInfo, flags = flags, renderPass = renderPass, attachmentCount = (uint)attachments.Length, pAttachments = attachmentsPtr, width = width, height = height, layers = layers }; handle = Device.CreateFramebuffer(ref framebufferCreateInfo); }; }
public Framebuffer(RenderPass renderPass, uint width, uint height, uint layers, ReadOnlySpan <VkImageView> attachments, VkFramebufferCreateFlags flags = 0) { this.renderPass = renderPass; Width = width; Height = height; Create(renderPass, width, height, layers, attachments, flags); }