Class VulkanRenderModuleFrameBuffer

java.lang.Object
io.codetoil.curved_spacetime.render.vulkan.VulkanRenderModuleFrameBuffer

public class VulkanRenderModuleFrameBuffer extends Object
A framebuffer: the concrete set of image views a render pass draws into.

A render pass describes attachments abstractly; a framebuffer binds those slots to actual images. One is needed per swap chain image, since each frame targets a different image.

  • Constructor Details

    • VulkanRenderModuleFrameBuffer

      public VulkanRenderModuleFrameBuffer(VulkanModuleLogicalDevice logicalDevice, int width, int height, LongBuffer pAttachments, long renderPass)
      Creates a framebuffer binding the given attachments for a render pass.
      Parameters:
      logicalDevice - the device to create the framebuffer on
      width - the framebuffer's width in pixels
      height - the framebuffer's height in pixels
      pAttachments - the image views filling the render pass's attachment slots, in order
      renderPass - the render pass this framebuffer is compatible with
      Throws:
      AssertionError - if the framebuffer cannot be created
  • Method Details

    • cleanup

      public void cleanup()
      Destroys the framebuffer, leaving its attachments untouched.
    • getVkFrameBuffer

      public long getVkFrameBuffer()
      Returns the underlying Vulkan handle.
      Returns:
      the VkFramebuffer handle