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 Summary
Modifier and TypeMethodDescriptionvoid
Uploads the pixel data of the TextureArray layers of the TextureArray to the OpenGL ES texture.int
getDepth()
int
int
int
int
getWidth()
boolean
void
prepare()
Prepares the TextureArrayData for a call toconsumeTextureArrayData()
.
-
Method Details
-
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
-
getInternalFormat
int getInternalFormat()- Returns:
- the internal format of this TextureArray
-
getGLType
int getGLType()- Returns:
- the GL type of this TextureArray
-