Class VulkanRenderModuleImageView

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

public class VulkanRenderModuleImageView extends Object
A view onto a Vulkan image, describing how that image is to be interpreted.

Images cannot be used directly by a render pass; a view selects which part of an image is in play — its format, which aspect such as colour or depth, and which mip levels and array layers — and it is the view that gets attached to a framebuffer.

  • Constructor Details

    • VulkanRenderModuleImageView

      public VulkanRenderModuleImageView(VulkanModuleLogicalDevice vulkanModuleLogicalDevice, long vkImage, VulkanRenderModuleImageView.VulkanImageViewData vulkanImageViewData)
      Creates a view onto the given image.
      Parameters:
      vulkanModuleLogicalDevice - the device that owns the image
      vkImage - the image to view
      vulkanImageViewData - how the image should be interpreted
      Throws:
      AssertionError - if the view cannot be created
  • Method Details

    • cleanup

      public void cleanup()
      Destroys the view, leaving the image it referenced untouched.
    • getAspectMask

      public int getAspectMask()
      Returns which aspect of the image this view exposes.
      Returns:
      the Vulkan aspect mask, such as colour or depth
    • getMipLevels

      public int getMipLevels()
      Returns how many mip levels this view covers.
      Returns:
      the mip level count
    • getVkImageView

      public long getVkImageView()
      Returns the underlying Vulkan handle.
      Returns:
      the VkImageView handle
    • getVkImage

      public long getVkImage()
      Returns the image this view was created onto.
      Returns:
      the VkImage handle