APIdia Launch Partner
Top Fields Constructors Methods
com.badlogic.gdx.graphics.glutils

public Class FileTextureData

extends Object
implements TextureData
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.graphics.TextureData
Imports
com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.Pixmap, .Pixmap.Format, .PixmapIO, .TextureData, com.badlogic.gdx.utils.GdxRuntimeException

Field Summary

Modifier and TypeField and Description
pack-priv final FileHandle
pack-priv Pixmap.Format
pack-priv int
pack-priv boolean
pack-priv Pixmap
pack-priv boolean
pack-priv int

Constructor Summary

AccessConstructor and Description
public
FileTextureData(FileHandle file, Pixmap preloadedPixmap, Pixmap.Format format, boolean useMipMaps)

Method Summary

Modifier and TypeMethod and Description
public void
consumeCustomData(int target)

Implements com.badlogic.gdx.graphics.TextureData.consumeCustomData.

Uploads the pixel data to the OpenGL ES texture.

public Pixmap
consumePixmap()

Implements com.badlogic.gdx.graphics.TextureData.consumePixmap.

Returns the Pixmap for upload by Texture.

public boolean
public FileHandle
public Pixmap.Format
public int
public TextureData.TextureDataType
public int
public boolean
public boolean
public void
prepare()

Implements com.badlogic.gdx.graphics.TextureData.prepare.

Prepares the TextureData for a call to consumePixmap() or consumeCustomData(int).

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fileback to summary
pack-priv final FileHandle file
formatback to summary
pack-priv Pixmap.Format format
heightback to summary
pack-priv int height
isPreparedback to summary
pack-priv boolean isPrepared
pixmapback to summary
pack-priv Pixmap pixmap
useMipMapsback to summary
pack-priv boolean useMipMaps
widthback to summary
pack-priv int width

Constructor Detail

FileTextureDataback to summary
public FileTextureData(FileHandle file, Pixmap preloadedPixmap, Pixmap.Format format, boolean useMipMaps)

Method Detail

consumeCustomDataback to summary
public void consumeCustomData(int target)

Implements com.badlogic.gdx.graphics.TextureData.consumeCustomData.

Doc from com.badlogic.gdx.graphics.TextureData.consumeCustomData.

Uploads the pixel data to the OpenGL ES texture. The caller must bind an OpenGL ES texture. A call to prepare() must preceed a call to this method. Any internal data structures created in prepare() should be disposed of here.

Annotations
@Override
consumePixmapback to summary
public Pixmap consumePixmap()

Implements com.badlogic.gdx.graphics.TextureData.consumePixmap.

Doc from com.badlogic.gdx.graphics.TextureData.consumePixmap.

Returns the Pixmap for upload by Texture. A call to prepare() must precede a call to this method. Any internal data structures created in prepare() should be disposed of here.

Annotations
@Override
disposePixmapback to summary
public boolean disposePixmap()

Implements com.badlogic.gdx.graphics.TextureData.disposePixmap.

Annotations
@Override
getFileHandleback to summary
public FileHandle getFileHandle()
getFormatback to summary
public Pixmap.Format getFormat()

Implements com.badlogic.gdx.graphics.TextureData.getFormat.

Annotations
@Override
getHeightback to summary
public int getHeight()

Implements com.badlogic.gdx.graphics.TextureData.getHeight.

Annotations
@Override
getTypeback to summary
public TextureData.TextureDataType getType()

Implements com.badlogic.gdx.graphics.TextureData.getType.

Annotations
@Override
getWidthback to summary
public int getWidth()

Implements com.badlogic.gdx.graphics.TextureData.getWidth.

Annotations
@Override
isManagedback to summary
public boolean isManaged()

Implements com.badlogic.gdx.graphics.TextureData.isManaged.

Annotations
@Override
isPreparedback to summary
public boolean isPrepared()

Implements com.badlogic.gdx.graphics.TextureData.isPrepared.

Annotations
@Override
prepareback to summary
public void prepare()

Implements com.badlogic.gdx.graphics.TextureData.prepare.

Doc from com.badlogic.gdx.graphics.TextureData.prepare.

Prepares the TextureData for a call to consumePixmap() or consumeCustomData(int). This method can be called from a non OpenGL thread and should thus not interact with OpenGL.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

useMipMapsback to summary
public boolean useMipMaps()

Implements com.badlogic.gdx.graphics.TextureData.useMipMaps.

Annotations
@Override