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

public Interface TextureBinder

Known Direct Implementers
com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder
Imports
com.badlogic.gdx.graphics.GLTexture, .Texture

Responsible for binding textures, may implement a strategy to avoid binding a texture unnecessarily. A TextureBinder may decide to which texture unit it binds a texture.
Author
badlogic, Xoppa

Method Summary

Modifier and TypeMethod and Description
public void
begin()

Prepares the binder for operation, must be matched with a call to end().

public int

Returns:

the unit the texture was bound to
bind
(TextureDescriptor<T extends GLTexture> textureDescriptor)

Binds the texture to an available unit and applies the filters in the descriptor.

public int

Returns:

the unit the texture was bound to
bind
(GLTexture texture)

Binds the texture to an available unit.

public void
end()

Disables all used texture units and unbinds textures.

public int
getBindCount()

Returns: the number of binds actually executed since the last call to resetCounts()

public int
getReuseCount()

Returns: the number of binds that could be avoided by reuse

public void
resetCounts()

Resets the bind/reuse counts

Method Detail

beginback to summary
public void begin()

Prepares the binder for operation, must be matched with a call to end().

bindback to summary
public int bind(TextureDescriptor<T extends GLTexture> textureDescriptor)

Binds the texture to an available unit and applies the filters in the descriptor.

Parameters
textureDescriptor:TextureDescriptor<T extends GLTexture>

the TextureDescriptor

Returns:int

the unit the texture was bound to

bindback to summary
public int bind(GLTexture texture)

Binds the texture to an available unit.

Parameters
texture:GLTexture

the Texture

Returns:int

the unit the texture was bound to

endback to summary
public void end()

Disables all used texture units and unbinds textures. Resets the counts.

getBindCountback to summary
public int getBindCount()
Returns:int

the number of binds actually executed since the last call to resetCounts()

getReuseCountback to summary
public int getReuseCount()
Returns:int

the number of binds that could be avoided by reuse

resetCountsback to summary
public void resetCounts()

Resets the bind/reuse counts