Package icyllis.arc3d.vulkan

# Class VulkanImageView

java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.engine.ManagedResource
icyllis.arc3d.vulkan.VulkanImageView

All Implemented Interfaces:
  `RefCounted`

public final class VulkanImageView extends ManagedResource
Represents Vulkan image views, managed by `VulkanImage`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `deallocate()`
  Override this method to invoke de-allocation of the underlying resource.
  `int`
  `getBaseArrayLayer()`
  `int`
  `getBaseMipLevel()`
  `int`
  `getLayerCount()`
  `int`
  `getLevelCount()`
  `static VulkanImageView`
  `makeAttachment(VulkanDevice device, long image, int imageType, int format, int mipLevel, int arraySlice)`
  Create a render target view as attachment.
  `static VulkanImageView`
  `makeTexture(VulkanDevice device, long image, int imageType, int format, short swizzle, int mipLevelCount, int layerCount)`
  Create a shader resource view as shader input, for texture sampling.
  `long`
  `vkImageView()`

  ### Methods inherited from class icyllis.arc3d.engine.ManagedResource

  `getDevice`

  ### Methods inherited from class icyllis.arc3d.core.RefCnt

  `create, create, getRefCnt, getRefCntAcquire, getRefCntVolatile, move, move, ref, unique, unref`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### makeTexture

    @Nullable public static VulkanImageView makeTexture(@Nonnull VulkanDevice device, long image, int imageType, int format, short swizzle, int mipLevelCount, int layerCount)
    Create a shader resource view as shader input, for texture sampling.
    Parameters:
      `imageType` - see `Engine.ImageType`
      `swizzle` - see `Swizzle`

  - ### makeAttachment

    @Nullable public static VulkanImageView makeAttachment(@Nonnull VulkanDevice device, long image, int imageType, int format, int mipLevel, int arraySlice)
    Create a render target view as attachment.

  - ### vkImageView

    public long vkImageView()

  - ### getBaseMipLevel

    public int getBaseMipLevel()

  - ### getLevelCount

    public int getLevelCount()

  - ### getBaseArrayLayer

    public int getBaseArrayLayer()

  - ### getLayerCount

    public int getLayerCount()

  - ### deallocate

    protected void deallocate()
    Description copied from class: `RefCnt`
    Override this method to invoke de-allocation of the underlying resource.
    Specified by:
      `deallocate` in class `RefCnt`