public abstract class Texture
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Texture.Listener |
Modifier and Type | Field and Description |
---|---|
static boolean |
LOG_ENABLED |
float |
mCoordScaleX |
float |
mCoordScaleY |
protected int |
mExpirationTime |
protected boolean |
mExpired |
protected GL10 |
mGL |
protected GLState |
mGLState |
protected int |
mIdleTime |
protected Texture.Listener |
mListener |
protected PointF |
mSize |
int |
mTextureID |
static java.lang.String |
TAG |
Modifier | Constructor and Description |
---|---|
protected |
Texture(GLState glState) |
protected |
Texture(GLState glState,
Bitmap bitmap) |
protected |
Texture(GLState glState,
Bitmap bitmap,
int actualWidth,
int actualHeight,
int mipmaps) |
Modifier and Type | Method and Description |
---|---|
void |
bind() |
int |
getExpirationTime()
Get the expiration time (in ms)
|
Texture.Listener |
getListener() |
PointF |
getSize() |
int |
getTextureID() |
boolean |
isExpired() |
boolean |
isLoaded() |
boolean |
isPo2() |
void |
load(Bitmap bitmap,
int actualWidth,
int actualHeight,
int mipmaps)
This MUST be executed on GL Thread.
|
abstract void |
reload() |
void |
reload(GLState glState) |
protected void |
setBitmapSize(int bitmapWidth,
int bitmapHeight,
int actualWidth,
int actualHeight) |
void |
setExpirationTime(int expirationTime)
Set how long (in ms) of idle/inactive time before this Texture should be expired and unloaded automatically.
|
void |
setFilters(int minFilter,
int magFilter) |
void |
setListener(Texture.Listener listener) |
void |
setRepeat(int s,
int t)
Set repeating mode
|
java.lang.String |
toString() |
void |
unload() |
void |
update(int deltaTime) |
public static boolean LOG_ENABLED
public static final java.lang.String TAG
protected GLState mGLState
protected GL10 mGL
public int mTextureID
public float mCoordScaleX
public float mCoordScaleY
protected PointF mSize
protected Texture.Listener mListener
protected int mExpirationTime
protected int mIdleTime
protected boolean mExpired
protected Texture(GLState glState)
protected Texture(GLState glState, Bitmap bitmap)
protected Texture(GLState glState, Bitmap bitmap, int actualWidth, int actualHeight, int mipmaps)
public void load(Bitmap bitmap, int actualWidth, int actualHeight, int mipmaps)
bitmap
- actualWidth
- actualHeight
- mipmaps
- protected void setBitmapSize(int bitmapWidth, int bitmapHeight, int actualWidth, int actualHeight)
public PointF getSize()
public void setFilters(int minFilter, int magFilter)
public void setRepeat(int s, int t)
s
- can be GL_CLAMP_TO_EDGE or GL_REPEATt
- can be GL_CLAMP_TO_EDGE or GL_REPEATpublic void bind()
public void unload()
public int getTextureID()
public boolean isLoaded()
public void reload(GLState glState)
public abstract void reload()
public boolean isPo2()
public void update(int deltaTime)
deltaTime
- public int getExpirationTime()
public void setExpirationTime(int expirationTime)
expirationTime
- TextureManager.#setExpirationCheckInterval(int)
public boolean isExpired()
public java.lang.String toString()
toString
in class java.lang.Object
public Texture.Listener getListener()
public void setListener(Texture.Listener listener)