Package icyllis.arc3d.engine

# Class BackendImage

java.lang.Object
icyllis.arc3d.engine.BackendImage

Direct Known Subclasses:
  `GLBackendImage`, `VulkanBackendImage`

public abstract class BackendImage extends Object
Descriptor of 3D API image/texture that can be shared between recording contexts, OpenGL shared contexts and cross-API usage, including its dimension, image view type, and memory allocation.

A BackendImage instance is initialized once, and may be shared.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final ImageDesc`
  `mDesc`
  `protected final ImageMutableState`
  `mMutableState`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `BackendImage(ImageDesc desc, ImageMutableState mutableState)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final int`
  `getArraySize()`
  `abstract int`
  `getBackend()`
  `abstract BackendFormat`
  `getBackendFormat()`
  Get the BackendFormat for this image/texture.
  `final int`
  `getDepth()`
  `final ImageDesc`
  `getDesc()`
  Get the backend info for this image/texture.
  `final int`
  `getHeight()`
  `final int`
  `getImageType()`
  `final int`
  `getMipLevelCount()`
  `final ImageMutableState`
  `getMutableState()`
  Get the backend mutable state for this image/texture.
  `final int`
  `getWidth()`
  `void`
  `glTextureParametersModified()`
  Call this to indicate that the texture parameters have been modified in the GL context externally to Context.
  `abstract boolean`
  `isExternal()`
  `final boolean`
  `isMipmapped()`
  `abstract boolean`
  `isProtected()`
  Returns true if we are working with protected content.
  `abstract boolean`
  `isSameImage(BackendImage image)`
  Returns true if both images are valid and refer to the same API image handle.
  `void`
  `setVkImageLayout(int layout)`
  Anytime the client changes the VkImageLayout of the VkImage captured by this `BackendImage`, they must call this function to notify pipeline of the changed layout.
  `void`
  `setVkQueueFamilyIndex(int queueFamilyIndex)`
  Anytime the client changes the QueueFamilyIndex of the VkImage captured by this `BackendImage`, they must call this function to notify pipeline of the changed layout.

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

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

- ## Field Details

  - ### mDesc

    protected final ImageDesc mDesc

  - ### mMutableState

    protected final ImageMutableState mMutableState

- ## Constructor Details

  - ### BackendImage

    protected BackendImage(ImageDesc desc, ImageMutableState mutableState)

- ## Method Details

  - ### getBackend

    public abstract int getBackend()
    Returns:
      see `Engine.BackendApi`

  - ### getWidth

    public final int getWidth()
    Returns:
      width in pixels

  - ### getHeight

    public final int getHeight()
    Returns:
      height in pixels

  - ### getDepth

    public final int getDepth()

  - ### getArraySize

    public final int getArraySize()

  - ### getImageType

    public final int getImageType()
    Returns:
      see `Engine.ImageType`

  - ### isExternal

    public abstract boolean isExternal()
    Returns:
      external texture

  - ### isMipmapped

    public final boolean isMipmapped()
    Returns:
      whether the image has mip levels allocated or not

  - ### getMipLevelCount

    public final int getMipLevelCount()

  - ### getDesc

    @Nonnull public final ImageDesc getDesc()
    Get the backend info for this image/texture.

  - ### getMutableState

    @Nonnull public final ImageMutableState getMutableState()
    Get the backend mutable state for this image/texture.

  - ### glTextureParametersModified

    public void glTextureParametersModified()
    Call this to indicate that the texture parameters have been modified in the GL context externally to Context.

    Tells client that these parameters of the texture are changed out of client control (for example, you called glTexParameteri without using `GLDevice`). The local states will be forced to reset to a known state when next use.

  - ### setVkImageLayout

    public void setVkImageLayout(int layout)
    Anytime the client changes the VkImageLayout of the VkImage captured by this `BackendImage`, they must call this function to notify pipeline of the changed layout.

  - ### setVkQueueFamilyIndex

    public void setVkQueueFamilyIndex(int queueFamilyIndex)
    Anytime the client changes the QueueFamilyIndex of the VkImage captured by this `BackendImage`, they must call this function to notify pipeline of the changed layout.

  - ### getBackendFormat

    @Nonnull public abstract BackendFormat getBackendFormat()
    Get the BackendFormat for this image/texture.

  - ### isProtected

    public abstract boolean isProtected()
    Returns true if we are working with protected content.

  - ### isSameImage

    public abstract boolean isSameImage(BackendImage image)
    Returns true if both images are valid and refer to the same API image handle.