Interface TextureAsset

All Superinterfaces:
Asset, Destructible, TextureBase
All Known Implementing Classes:
Texture, TextureArrayLayer

public interface TextureAsset extends TextureBase, Asset
Base class for different types of texture assets.

This can be used for both simple texture and layers inside texture arrays.

  • Method Details

    • hasEqualLocation

      boolean hasEqualLocation(TextureAsset other)
      Checks whether two textures are from the same location.
      Parameters:
      other - Other texture
      Returns:
      True if other is equal to this texture or in the same texture array.
    • getPath

      String getPath()
      Description copied from interface: Asset
      Returns the path to the file this asset was loaded from.
      Specified by:
      getPath in interface Asset
      Returns:
      The path of the image file of this texture.
    • destroy

      default void destroy()
      Removes this texture from the resource pool and deletes it.
      Specified by:
      destroy in interface Asset
      Specified by:
      destroy in interface Destructible
    • isInArray

      boolean isInArray()
      Returns:
      True if this texture is part of a texture array.
    • getArray

      TextureArray getArray()
      Returns:
      The texture array this texture is part of, or null if this texture is not in a texture array.