Package icyllis.arc3d.vulkan

# Class VulkanImage

java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.Image
icyllis.arc3d.vulkan.VulkanImage

All Implemented Interfaces:
  `RefCounted`

public final class VulkanImage extends Image
Represents Vulkan images, can be used as textures or attachments.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final record`
  `VulkanImage.CreatedImageInfo`
  `static final class`
  `VulkanImage.ResourceKey`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.engine.Image

  `mFlags`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VulkanImage(Context context, VulkanImageDesc desc, VulkanImageMutableState mutableState, long image, VulkanAllocation memoryAlloc, boolean budgeted, boolean wrapped)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VulkanImage.CreatedImageInfo`
  `create(VulkanDevice device, VulkanImageDesc desc)`
  Create Vulkan image and allocate its device memory.
  `static @SharedPtr VulkanImage`
  `make(Context context, VulkanImageDesc desc, boolean budgeted)`
  `protected void`
  `onRelease()`
  Subclass should override this method to free GPU resources in the backend API.
  `String`
  `toString()`
  `long`
  `vkImage()`

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

  `getArraySize, getDepth, getDepthBits, getDesc, getHeight, getImageType, getMipLevelCount, getMutableState, getSampleCount, getStencilBits, getWidth, isMipmapped, isMipmapsDirty, isProtected, isReadOnly, isRenderable, isSampledImage, isStorageImage, setMipmapsDirty, setReleaseCallback`

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

  `getContext, getDevice, getKey, getLabel, getMemorySize, getUniqueID, hasAnyRefs, hasCacheRef, hasCommandBufferRef, hasUsageRef, isBudgeted, isDestroyed, isPurgeable, isWrapped, onSetLabel, ref, refCommandBuffer, setKey, setLabel, setNonCacheable, unref, unrefCommandBuffer`

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

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

- ## Constructor Details

  - ### VulkanImage

    public VulkanImage(Context context, VulkanImageDesc desc, VulkanImageMutableState mutableState, long image, VulkanAllocation memoryAlloc, boolean budgeted, boolean wrapped)

- ## Method Details

  - ### create

    @Nullable public static VulkanImage.CreatedImageInfo create(VulkanDevice device, VulkanImageDesc desc)
    Create Vulkan image and allocate its device memory.
    Returns:
      created image or null if failed

  - ### make

    @Nullable @SharedPtr public static @SharedPtr VulkanImage make(@Nonnull Context context, @Nonnull VulkanImageDesc desc, boolean budgeted)

  - ### vkImage

    public long vkImage()

  - ### onRelease

    protected void onRelease()
    Description copied from class: `Resource`
    Subclass should override this method to free GPU resources in the backend API.
    Overrides:
      `onRelease` in class `Image`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`