public class PixmapTextureData extends java.lang.Object implements TextureData
TextureData.TextureDataType| Constructor and Description |
|---|
PixmapTextureData(Pixmap pixmap,
Pixmap.Format format,
boolean useMipMaps,
boolean disposePixmap) |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeCompressedData()
Uploads the pixel data to the OpenGL ES texture.
|
Pixmap |
consumePixmap()
Returns the
Pixmap for upload by Texture. |
boolean |
disposePixmap() |
Pixmap.Format |
getFormat() |
int |
getHeight() |
TextureData.TextureDataType |
getType() |
int |
getWidth() |
boolean |
isManaged() |
boolean |
isPrepared() |
void |
prepare()
Prepares the TextureData for a call to
TextureData.consumePixmap() or TextureData.consumeCompressedData(). |
boolean |
useMipMaps() |
public PixmapTextureData(Pixmap pixmap, Pixmap.Format format, boolean useMipMaps, boolean disposePixmap)
public boolean disposePixmap()
disposePixmap in interface TextureDataTextureData.consumePixmap() should dispose the Pixmap returned by TextureData.consumePixmap()public Pixmap consumePixmap()
TextureDataPixmap for upload by Texture. A call to TextureData.prepare() must preceed a call to this method. Any
internal datastructures created in TextureData.prepare() should be disposed of here.consumePixmap in interface TextureDatapublic int getWidth()
getWidth in interface TextureDatapublic int getHeight()
getHeight in interface TextureDatapublic Pixmap.Format getFormat()
getFormat in interface TextureDataPixmap.Format of the pixel datapublic boolean useMipMaps()
useMipMaps in interface TextureDatapublic boolean isManaged()
isManaged in interface TextureDatapublic TextureData.TextureDataType getType()
getType in interface TextureDataTextureData.TextureDataTypepublic void consumeCompressedData()
TextureDataTextureData.prepare()
must preceed a call to this method. Any internal datastructures created in TextureData.prepare().consumeCompressedData in interface TextureDatapublic boolean isPrepared()
isPrepared in interface TextureDatapublic void prepare()
TextureDataTextureData.consumePixmap() or TextureData.consumeCompressedData(). This method can be
called from a non OpenGL thread and should thus not interact with OpenGL.prepare in interface TextureData