com.badlogic.gdx.graphics.glutils
Class ETC1TextureData

java.lang.Object
  extended by com.badlogic.gdx.graphics.glutils.ETC1TextureData
All Implemented Interfaces:
TextureData

public class ETC1TextureData
extends Object
implements TextureData


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.badlogic.gdx.graphics.TextureData
TextureData.TextureDataType
 
Constructor Summary
ETC1TextureData(ETC1.ETC1Data encodedImage, boolean useMipMaps)
           
ETC1TextureData(FileHandle file)
           
ETC1TextureData(FileHandle file, boolean useMipMaps)
           
 
Method Summary
 void consumeCompressedData(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.consumeCompressedData(int).
 boolean useMipMaps()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ETC1TextureData

public ETC1TextureData(FileHandle file)

ETC1TextureData

public ETC1TextureData(FileHandle file,
                       boolean useMipMaps)

ETC1TextureData

public ETC1TextureData(ETC1.ETC1Data encodedImage,
                       boolean useMipMaps)
Method Detail

getType

public TextureData.TextureDataType getType()
Specified by:
getType in interface TextureData
Returns:
the TextureData.TextureDataType

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(int). This method can be called from a non OpenGL thread and should thus not interact with OpenGL.

Specified by:
prepare in interface TextureData

consumeCompressedData

public void consumeCompressedData(int target)
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

consumePixmap

public Pixmap consumePixmap()
Description copied from interface: TextureData
Returns the Pixmap for upload by Texture. A call to TextureData.prepare() must precede 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.


Copyright © 2013. All Rights Reserved.