Interface Texture3DData

  • All Known Implementing Classes:
    CustomTexture3DData

    public interface Texture3DData
    Used by a Texture3D to load the pixel data. The Texture3D will request the Texture3DData to prepare itself through prepare() and upload its data using consume3DData(). These are the first methods to be called by Texture3D. After that the Texture3D will invoke the other methods to find out about the size of the image data, the format, whether the Texture3DData is able to manage the pixel data if the OpenGL ES context is lost.

    Before a call to either consume3DData(), Texture3D will bind the OpenGL ES texture.

    • Method Detail

      • isPrepared

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

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

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

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

        int getDepth()
        Returns:
        the depth of this Texture3D
      • getInternalFormat

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

        int getGLType()
        Returns:
        the GL type of this Texture3D
      • useMipMaps

        boolean useMipMaps()
        Returns:
        whether to generate mipmaps or not.
      • consume3DData

        void consume3DData()
        Uploads the pixel data 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.
      • isManaged

        boolean isManaged()
        Returns:
        whether this implementation can cope with a EGL context loss.