|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder
public final class DefaultTextureBinder
Class that you assign a range of texture units and binds textures for you within that range. It does some basic usage tracking to avoid unnessecary bind calls.
Field Summary | |
---|---|
static int |
MAX_GLES_UNITS
GLES only supports up to 32 textures |
static int |
ROUNDROBIN
|
static int |
WEIGHTED
|
Constructor Summary | |
---|---|
DefaultTextureBinder(int method)
Uses all available texture units and reuse weight of 3 |
|
DefaultTextureBinder(int method,
int offset)
Uses all remaining texture units and reuse weight of 3 |
|
DefaultTextureBinder(int method,
int offset,
int count)
Uses reuse weight of 10 |
|
DefaultTextureBinder(int method,
int offset,
int count,
int reuseWeight)
|
Method Summary | |
---|---|
void |
begin()
Prepares the binder for operation, must be matched with a call to TextureBinder.end() . |
int |
bind(GLTexture texture)
Binds the texture to an available unit. |
int |
bind(TextureDescriptor textureDesc)
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ROUNDROBIN
public static final int WEIGHTED
public static final int MAX_GLES_UNITS
Constructor Detail |
---|
public DefaultTextureBinder(int method)
public DefaultTextureBinder(int method, int offset)
public DefaultTextureBinder(int method, int offset, int count)
public DefaultTextureBinder(int method, int offset, int count, int reuseWeight)
Method Detail |
---|
public void begin()
TextureBinder
TextureBinder.end()
.
begin
in interface TextureBinder
public void end()
TextureBinder
end
in interface TextureBinder
public final int bind(TextureDescriptor textureDesc)
TextureBinder
bind
in interface TextureBinder
textureDesc
- the TextureDescriptor
public final int bind(GLTexture texture)
TextureBinder
bind
in interface TextureBinder
texture
- the Texture
public final int getBindCount()
getBindCount
in interface TextureBinder
TextureBinder.resetCounts()
public final int getReuseCount()
getReuseCount
in interface TextureBinder
public final void resetCounts()
TextureBinder
resetCounts
in interface TextureBinder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |