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

public Interface Texture3DData

Known Direct Implementers
com.badlogic.gdx.graphics.glutils.CustomTexture3DData

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

Before a call to either consume3DData(), Texture3D will bind the OpenGL ES texture.

Author
mgsx

Method Summary

Modifier and TypeMethod and Description
public void
consume3DData()

Uploads the pixel data to the OpenGL ES texture.

public int
getDepth()

Returns: the depth of this Texture3D

public int
getGLType()

Returns: the GL type of this Texture3D

public int
getHeight()

Returns: the height of this Texture3D

public int
getInternalFormat()

Returns: the internal format of this Texture3D

public int
getWidth()

Returns: the width of this Texture3D

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 consume3DData().

public boolean
useMipMaps()

Returns: whether to generate mipmaps or not.

Method Detail

consume3DDataback to summary
public void consume3DData()

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.

getDepthback to summary
public int getDepth()
Returns:int

the depth of this Texture3D

getGLTypeback to summary
public int getGLType()
Returns:int

the GL type of this Texture3D

getHeightback to summary
public int getHeight()
Returns:int

the height of this Texture3D

getInternalFormatback to summary
public int getInternalFormat()
Returns:int

the internal format of this Texture3D

getWidthback to summary
public int getWidth()
Returns:int

the width of this Texture3D

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

useMipMapsback to summary
public boolean useMipMaps()
Returns:boolean

whether to generate mipmaps or not.