Package arc.graphics

Interface TextureArrayData

All Known Implementing Classes:
FileTextureArrayData

public interface TextureArrayData
Used by a TextureArray to load the pixel data. The TextureArray will request the TextureArrayData to prepare itself through prepare() and upload its data using consumeTextureArrayData(). These are the first methods to be called by TextureArray. After that the TextureArray will invoke the other methods to find out about the size of the image data, the format.

Before a call to either consumeTextureArrayData(), TextureArray will bind the OpenGL ES texture.

Look at FileTextureArrayData for example implementation of this interface.

  • Method Details

    • isPrepared

      boolean isPrepared()
      Returns:
      whether the TextureArrayData is prepared or not.
    • prepare

      void prepare()
      Prepares the TextureArrayData for a call to consumeTextureArrayData(). This method can be called from a non OpenGL thread and should thus not interact with OpenGL.
    • consumeTextureArrayData

      void consumeTextureArrayData()
      Uploads the pixel data of the TextureArray layers of the TextureArray to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to prepare() must preceed a call to this method. Any internal data structures created in prepare() should be disposed of here.
    • getWidth

      int getWidth()
      Returns:
      the width of this TextureArray
    • getHeight

      int getHeight()
      Returns:
      the height of this TextureArray
    • getDepth

      int getDepth()
      Returns:
      the layer count of this TextureArray
    • getInternalFormat

      int getInternalFormat()
      Returns:
      the internal format of this TextureArray
    • getGLType

      int getGLType()
      Returns:
      the GL type of this TextureArray