Texture to load the pixel data. A TextureData can either return a Pixmap or upload the pixel data
itself. It signals it's type via getType() to the Texture that's using it. The Texture will then either invoke
consumePixmap() or consumeCustomData(int). These are the first methods to be called by Texture. After that
the Texture will invoke the other methods to find out about the size of the image data, the format, whether mipmaps should be
generated and whether the TextureData is able to manage the pixel data if the OpenGL ES context is lost.
In case the TextureData implementation has the type TextureDataType#Custom, the implementation has to generate the
mipmaps itself if necessary. See MipMapGenerator.
Before a call to either consumePixmap() or consumeCustomData(int), Texture will bind the OpenGL ES texture.
Look at FileTextureData and ETC1TextureData for example implementations of this interface.
| Modifier and Type | Class and Description |
|---|---|
| public static class | TextureData.
Provides static method to instantiate the right implementation (Pixmap, ETC1, KTX). |
| public static enum | TextureData.
The type of this |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Pixmap | |
| public boolean | disposePixmap()
Returns: whether the caller of |
| public Pixmap. | |
| public int | |
| public TextureData. | |
| public int | |
| public boolean | |
| public boolean | |
| public void | |
| public boolean |
| consumeCustomData | back to summary |
|---|---|
| public void consumeCustomData(int target) Uploads the pixel data to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to | |
| consumePixmap | back to summary |
|---|---|
| public Pixmap consumePixmap() Returns the
| |
| disposePixmap | back to summary |
|---|---|
public boolean disposePixmap()
| |
| getFormat | back to summary |
|---|---|
| public Pixmap. | |
| getHeight | back to summary |
|---|---|
public int getHeight()
| |
| getType | back to summary |
|---|---|
public TextureData.
| |
| getWidth | back to summary |
|---|---|
public int getWidth()
| |
| isManaged | back to summary |
|---|---|
public boolean isManaged()
| |
| isPrepared | back to summary |
|---|---|
public boolean isPrepared()
| |
| prepare | back to summary |
|---|---|
| public void prepare() Prepares the TextureData for a call to | |
| useMipMaps | back to summary |
|---|---|
public boolean useMipMaps()
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static TextureData | |
| public static TextureData |
| Factory | back to summary |
|---|---|
| public Factory() | |
| loadFromFile | back to summary |
|---|---|
| public static TextureData loadFromFile(FileHandle file, boolean useMipMaps) | |
| loadFromFile | back to summary |
|---|---|
| public static TextureData loadFromFile(FileHandle file, Pixmap. | |
TextureData.
| Modifier and Type | Field and Description |
|---|---|
| public static final TextureData. | |
| public static final TextureData. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TextureData. | |
| public static TextureData. |
| Custom | back to summary |
|---|---|
| public static final TextureData. | |
| Pixmap | back to summary |
|---|---|
| public static final TextureData. | |
| TextureDataType | back to summary |
|---|---|
| private TextureDataType() | |
| valueOf | back to summary |
|---|---|
| public static TextureData. | |
| values | back to summary |
|---|---|
| public static TextureData. | |