com.badlogic.gdx.graphics.g3d.utils
Interface TextureBinder

All Known Implementing Classes:
DefaultTextureBinder

public interface TextureBinder

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
 void begin()
          Prepares the binder for operation, must be matched with a call to end().
 int bind(GLTexture texture)
          Binds the texture to an available unit.
 int bind(TextureDescriptor textureDescriptor)
          Binds the texture to an available unit and applies the filters in the descriptor.
 void end()
          Disables all used texture units and unbinds textures.
 int getBindCount()
           
 int getReuseCount()
           
 void resetCounts()
          Resets the bind/reuse counts
 

Method Detail

begin

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


end

void end()
Disables all used texture units and unbinds textures. Resets the counts.


bind

int bind(TextureDescriptor textureDescriptor)
Binds the texture to an available unit and applies the filters in the descriptor.

Parameters:
textureDescriptor - the TextureDescriptor
Returns:
the unit the texture was bound to

bind

int bind(GLTexture texture)
Binds the texture to an available unit.

Parameters:
texture - the Texture
Returns:
the unit the texture was bound to

getBindCount

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

getReuseCount

int getReuseCount()
Returns:
the number of binds that could be avoided by reuse

resetCounts

void resetCounts()
Resets the bind/reuse counts



Copyright © 2013. All Rights Reserved.