APIdia Launch Partner
Top Description Methods
com.badlogic.gdx.graphics

public Interface CubemapData

Known Direct Implementers
com.badlogic.gdx.graphics.glutils.FacedCubemapData, com.badlogic.gdx.graphics.glutils.KTXTextureData
Imports
com.badlogic.gdx.graphics.glutils.KTXTextureData

Used by a Cubemap to load the pixel data. The Cubemap will request the CubemapData to prepare itself through prepare() and upload its data using consumeCubemapData(). These are the first methods to be called by Cubemap. After that the Cubemap will invoke the other methods to find out about the size of the image data, the format, whether the CubemapData is able to manage the pixel data if the OpenGL ES context is lost.

Before a call to either consumeCubemapData(), Cubemap will bind the OpenGL ES texture.

Look at KTXTextureData for example implementation of this interface.
Author
Vincent Bousquet

Method Summary

Modifier and TypeMethod and Description
public void
consumeCubemapData()

Uploads the pixel data for the 6 faces of the cube to the OpenGL ES texture.

public int
getHeight()

Returns: the height of the pixel data

public int
getWidth()

Returns: the width of the pixel data

public boolean
isManaged()

Returns: whether this implementation can cope with a EGL context loss.

public boolean
isPrepared()

Returns: whether the TextureData is prepared or not.

public void
prepare()

Prepares the TextureData for a call to consumeCubemapData().

Method Detail

consumeCubemapDataback to summary
public void consumeCubemapData()

Uploads the pixel data for the 6 faces of the cube 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.

getHeightback to summary
public int getHeight()
Returns:int

the height of the pixel data

getWidthback to summary
public int getWidth()
Returns:int

the width of the pixel data

isManagedback to summary
public boolean isManaged()
Returns:boolean

whether this implementation can cope with a EGL context loss.

isPreparedback to summary
public boolean isPrepared()
Returns:boolean

whether the TextureData is prepared or not.

prepareback to summary
public void prepare()

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