Class VulkanRenderModuleImageView
java.lang.Object
io.codetoil.curved_spacetime.render.vulkan.VulkanRenderModuleImageView
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHow an image should be interpreted by a view, built up fluently. -
Constructor Summary
ConstructorsConstructorDescriptionVulkanRenderModuleImageView(VulkanModuleLogicalDevice vulkanModuleLogicalDevice, long vkImage, VulkanRenderModuleImageView.VulkanImageViewData vulkanImageViewData) Creates a view onto the given image. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Destroys the view, leaving the image it referenced untouched.intReturns which aspect of the image this view exposes.intReturns how many mip levels this view covers.longReturns the image this view was created onto.longReturns the underlying Vulkan handle.
-
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 imagevkImage- the image to viewvulkanImageViewData- 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
VkImageViewhandle
-
getVkImage
public long getVkImage()Returns the image this view was created onto.- Returns:
- the
VkImagehandle
-