public class GLOnlyTextureData extends java.lang.Object implements TextureData
TextureData implementation which should be used to create gl only textures. This TextureData fits perfectly for
FrameBuffer. The data is not managed.TextureData.Factory, TextureData.TextureDataType| Constructor and Description |
|---|
GLOnlyTextureData(int width,
int height,
int mipMapLevel,
int internalFormat,
int format,
int type) |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeCustomData(int target)
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.consumeCustomData(int). |
boolean |
useMipMaps() |
public GLOnlyTextureData(int width,
int height,
int mipMapLevel,
int internalFormat,
int format,
int type)
internalFormat - Specifies the internal format of the texture. Must be one of the following symbolic constants:
GL20.GL_ALPHA, GL20.GL_LUMINANCE, GL20.GL_LUMINANCE_ALPHA, GL20.GL_RGB,
GL20.GL_RGBA.format - Specifies the format of the texel data. Must match internalformat. The following symbolic values are accepted:
GL20.GL_ALPHA, GL20.GL_RGB, GL20.GL_RGBA, GL20.GL_LUMINANCE, and
GL20.GL_LUMINANCE_ALPHA.type - Specifies the data type of the texel data. The following symbolic values are accepted:
GL20.GL_UNSIGNED_BYTE, GL20.GL_UNSIGNED_SHORT_5_6_5, GL20.GL_UNSIGNED_SHORT_4_4_4_4, and
GL20.GL_UNSIGNED_SHORT_5_5_5_1.public TextureData.TextureDataType getType()
getType in interface TextureDataTextureData.TextureDataTypepublic boolean isPrepared()
isPrepared 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 TextureDatapublic 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 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 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 TextureData