public class KTXTextureData extends java.lang.Object implements TextureData, CubemapData
Texture or Cubemap.TextureData.Factory, TextureData.TextureDataType| Constructor and Description |
|---|
KTXTextureData(FileHandle file,
boolean genMipMaps) |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeCubemapData()
Uploads the pixel data for the 6 faces of the cube to the OpenGL ES texture.
|
void |
consumeCustomData(int target)
Uploads the pixel data to the OpenGL ES texture.
|
Pixmap |
consumePixmap()
Returns the
Pixmap for upload by Texture. |
boolean |
disposePixmap() |
void |
disposePreparedData() |
java.nio.ByteBuffer |
getData(int requestedLevel,
int requestedFace) |
Pixmap.Format |
getFormat() |
int |
getGlInternalFormat() |
int |
getHeight() |
int |
getNumberOfFaces() |
int |
getNumberOfMipMapLevels() |
TextureData.TextureDataType |
getType() |
int |
getWidth() |
boolean |
isManaged() |
boolean |
isPrepared() |
void |
prepare()
Prepares the TextureData for a call to
TextureData.consumePixmap() or TextureData.consumeCustomData(int). |
boolean |
useMipMaps() |
public KTXTextureData(FileHandle file, boolean genMipMaps)
public TextureData.TextureDataType getType()
getType in interface TextureDataTextureData.TextureDataTypepublic boolean isPrepared()
isPrepared in interface CubemapDataisPrepared in interface TextureDatapublic void prepare()
TextureDataTextureData.consumePixmap() or TextureData.consumeCustomData(int). This method can be
called from a non OpenGL thread and should thus not interact with OpenGL.prepare in interface CubemapDataprepare in interface TextureDatapublic void consumeCubemapData()
CubemapDataCubemapData.prepare() must preceed a call to this method. Any internal data structures created in CubemapData.prepare()
should be disposed of here.consumeCubemapData in interface CubemapDatapublic void consumeCustomData(int target)
TextureDataTextureData.prepare()
must preceed a call to this method. Any internal data structures created in TextureData.prepare() should be disposed of here.consumeCustomData in interface TextureDatapublic void disposePreparedData()
public Pixmap consumePixmap()
TextureDataPixmap for upload by Texture. A call to TextureData.prepare() must precede a call to this method. Any
internal data structures created in TextureData.prepare() should be disposed of here.consumePixmap in interface TextureDatapublic boolean disposePixmap()
disposePixmap in interface TextureDataTextureData.consumePixmap() should dispose the Pixmap returned by TextureData.consumePixmap()public int getWidth()
getWidth in interface CubemapDatagetWidth in interface TextureDatapublic int getHeight()
getHeight in interface CubemapDatagetHeight in interface TextureDatapublic int getNumberOfMipMapLevels()
public int getNumberOfFaces()
public int getGlInternalFormat()
public java.nio.ByteBuffer getData(int requestedLevel,
int requestedFace)
public Pixmap.Format getFormat()
getFormat in interface TextureDataPixmap.Format of the pixel datapublic boolean useMipMaps()
useMipMaps in interface TextureDatapublic boolean isManaged()
isManaged in interface CubemapDataisManaged in interface TextureData