Package com.badlogic.gdx.graphics
Interface TextureArrayData
-
- All Known Implementing Classes:
FileTextureArrayData
public interface TextureArrayDataUsed by aTextureArrayto load the pixel data. The TextureArray will request the TextureArrayData to prepare itself throughprepare()and upload its data usingconsumeTextureArrayData(). 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, whether the TextureArrayData is able to manage the pixel data if the OpenGL ES context is lost. Before a call to eitherconsumeTextureArrayData(), TextureArray will bind the OpenGL ES texture. Look atFileTextureArrayDatafor example implementation of this interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTextureArrayData.FactoryProvides static method to instantiate the right implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconsumeTextureArrayData()Uploads the pixel data of the TextureArray layers of the TextureArray to the OpenGL ES texture.intgetDepth()intgetGLType()intgetHeight()intgetInternalFormat()intgetWidth()booleanisManaged()booleanisPrepared()voidprepare()Prepares the TextureArrayData for a call toconsumeTextureArrayData().
-
-
-
Method Detail
-
isPrepared
boolean isPrepared()
- Returns:
- whether the TextureArrayData is prepared or not.
-
prepare
void prepare()
Prepares the TextureArrayData for a call toconsumeTextureArrayData(). This method can be called from a non OpenGL thread and should thus not interact with OpenGL.
-
consumeTextureArrayData
void consumeTextureArrayData()
-
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
-
isManaged
boolean isManaged()
- Returns:
- whether this implementation can cope with a EGL context loss.
-
getInternalFormat
int getInternalFormat()
- Returns:
- the internal format of this TextureArray
-
getGLType
int getGLType()
- Returns:
- the GL type of this TextureArray
-
-