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

public Interface TextureArrayData

Known Direct Implementers
com.badlogic.gdx.graphics.glutils.FileTextureArrayData
Imports
com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.glutils.FileTextureArrayData

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

Before a call to either consumeTextureArrayData(), TextureArray will bind the OpenGL ES texture.

Look at FileTextureArrayData for example implementation of this interface.
Author
Tomski

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
TextureArrayData.Factory

Provides static method to instantiate the right implementation.

Method Summary

Modifier and TypeMethod and Description
public void
consumeTextureArrayData()

Uploads the pixel data of the TextureArray layers of the TextureArray to the OpenGL ES texture.

public int
getDepth()

Returns: the layer count of this TextureArray

public int
getGLType()

Returns: the GL type of this TextureArray

public int
getHeight()

Returns: the height of this TextureArray

public int
getInternalFormat()

Returns: the internal format of this TextureArray

public int
getWidth()

Returns: the width of this TextureArray

public boolean
isManaged()

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

public boolean
isPrepared()

Returns: whether the TextureArrayData is prepared or not.

public void
prepare()

Prepares the TextureArrayData for a call to consumeTextureArrayData().

Method Detail

consumeTextureArrayDataback to summary
public void consumeTextureArrayData()

Uploads the pixel data of the TextureArray layers of the TextureArray 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 layer count of this TextureArray

getGLTypeback to summary
public int getGLType()
Returns:int

the GL type of this TextureArray

getHeightback to summary
public int getHeight()
Returns:int

the height of this TextureArray

getInternalFormatback to summary
public int getInternalFormat()
Returns:int

the internal format of this TextureArray

getWidthback to summary
public int getWidth()
Returns:int

the width of this TextureArray

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 TextureArrayData is prepared or not.

prepareback to summary
public void prepare()

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

com.badlogic.gdx.graphics back to summary

public Class TextureArrayData.Factory

extends Object
Class Inheritance

Provides static method to instantiate the right implementation.
Author
Tomski

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static TextureArrayData
loadFromFiles(Pixmap.Format format, boolean useMipMaps, FileHandle... files)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

loadFromFilesback to summary
public static TextureArrayData loadFromFiles(Pixmap.Format format, boolean useMipMaps, FileHandle... files)