Interface TextureBase

All Superinterfaces:
Resource
All Known Implementing Classes:
Texture, TextureArrayLayer

public interface TextureBase extends Resource
Base class for different types of textures.
  • Method Details

    • bind

      void bind()
      Binds this texture.
    • unbind

      void unbind()
      Unbinds this texture.
    • hasEqualLocation

      boolean hasEqualLocation(TextureBase 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.
    • getId

      int getId()
    • getWidth

      int getWidth()
      Returns:
      The width of this texture, in pixels.
    • getHeight

      int getHeight()
      Returns:
      The height of this texture, in pixels.
    • getPath

      String getPath()
      Specified by:
      getPath in interface Resource
      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 Resource
    • 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.