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 Details

  • Constructor Details

  • 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.