Class TextureArrayLayer

java.lang.Object
dev.prozilla.pine.common.system.resource.image.TextureArrayLayer
All Implemented Interfaces:
TextureBase, Resource

public class TextureArrayLayer extends Object implements TextureBase
Represents a layer of a texture array.
See Also:
  • Constructor Details

    • TextureArrayLayer

      public TextureArrayLayer(String path, TextureArray textureArray, int layer)
  • Method Details

    • bind

      public void bind()
      Description copied from interface: TextureBase
      Binds this texture.
      Specified by:
      bind in interface TextureBase
    • unbind

      public void unbind()
      Description copied from interface: TextureBase
      Unbinds this texture.
      Specified by:
      unbind in interface TextureBase
    • hasEqualLocation

      public boolean hasEqualLocation(TextureBase other)
      Description copied from interface: TextureBase
      Checks whether two textures are from the same location.
      Specified by:
      hasEqualLocation in interface TextureBase
      Parameters:
      other - Other texture
      Returns:
      True if other is equal to this texture or in the same texture array.
    • getId

      public int getId()
      Specified by:
      getId in interface TextureBase
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface TextureBase
      Returns:
      The width of this texture, in pixels.
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface TextureBase
      Returns:
      The height of this texture, in pixels.
    • getPath

      public String getPath()
      Specified by:
      getPath in interface Resource
      Specified by:
      getPath in interface TextureBase
      Returns:
      The path of the image file of this texture.
    • isInArray

      public boolean isInArray()
      Specified by:
      isInArray in interface TextureBase
      Returns:
      True if this texture is part of a texture array.
    • getArray

      public TextureArray getArray()
      Specified by:
      getArray in interface TextureBase
      Returns:
      The texture array this texture is part of, or null if this texture is not in a texture array.
    • destroy

      public void destroy()
      Destroys the texture array.
      Specified by:
      destroy in interface Resource
      Specified by:
      destroy in interface TextureBase