com.badlogic.gdx.graphics.glutils
Class FileTextureData
java.lang.Object
com.badlogic.gdx.graphics.glutils.FileTextureData
- All Implemented Interfaces:
- TextureData
public class FileTextureData
- extends java.lang.Object
- implements TextureData
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
copyToPOT
public static boolean copyToPOT
FileTextureData
public FileTextureData(FileHandle file,
Pixmap preloadedPixmap,
Pixmap.Format format,
boolean useMipMaps)
isPrepared
public boolean isPrepared()
- Specified by:
isPrepared
in interface TextureData
- Returns:
- whether the TextureData is prepared or not.
prepare
public void prepare()
- Description copied from interface:
TextureData
- Prepares the TextureData for a call to
TextureData.consumePixmap()
or TextureData.consumeCompressedData()
. This method can be
called from a non OpenGL thread and should thus not interact with OpenGL.
- Specified by:
prepare
in interface TextureData
consumePixmap
public Pixmap consumePixmap()
- Description copied from interface:
TextureData
- Returns the
Pixmap
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.
- Specified by:
consumePixmap
in interface TextureData
- Returns:
- the pixmap.
disposePixmap
public boolean disposePixmap()
- Specified by:
disposePixmap
in interface TextureData
- Returns:
- whether the caller of
TextureData.consumePixmap()
should dispose the Pixmap returned by TextureData.consumePixmap()
getWidth
public int getWidth()
- Specified by:
getWidth
in interface TextureData
- Returns:
- the width of the pixel data
getHeight
public int getHeight()
- Specified by:
getHeight
in interface TextureData
- Returns:
- the height of the pixel data
getFormat
public Pixmap.Format getFormat()
- Specified by:
getFormat
in interface TextureData
- Returns:
- the
Pixmap.Format
of the pixel data
useMipMaps
public boolean useMipMaps()
- Specified by:
useMipMaps
in interface TextureData
- Returns:
- whether to generate mipmaps or not.
isManaged
public boolean isManaged()
- Specified by:
isManaged
in interface TextureData
- Returns:
- whether this implementation can cope with a EGL context loss.
getFileHandle
public FileHandle getFileHandle()
getType
public TextureData.TextureDataType getType()
- Specified by:
getType
in interface TextureData
- Returns:
- the
TextureData.TextureDataType
consumeCompressedData
public void consumeCompressedData()
- Description copied from interface:
TextureData
- Uploads the pixel data to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to
TextureData.prepare()
must preceed a call to this method. Any internal datastructures created in TextureData.prepare()
.
- Specified by:
consumeCompressedData
in interface TextureData
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)