public abstract class

Texture

extends Object
implements ITexture
java.lang.Object
   ↳ org.andengine.opengl.texture.Texture
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Constants
int HARDWARE_TEXTURE_ID_INVALID
Fields
protected int mHardwareTextureID
protected final PixelFormat mPixelFormat
protected final TextureManager mTextureManager
protected final TextureOptions mTextureOptions
protected ITexture.ITextureStateListener mTextureStateListener
protected boolean mUpdateOnHardwareNeeded
Public Constructors
Texture(TextureManager pTextureManager, PixelFormat pPixelFormat, TextureOptions pTextureOptions, ITexture.ITextureStateListener pTextureStateListener)
Public Methods
void bind(GLState pGLState, int pGLActiveTexture)
void bind(GLState pGLState)
int getHardwareTextureID()
PixelFormat getPixelFormat()
TextureOptions getTextureOptions()
ITexture.ITextureStateListener getTextureStateListener()
boolean hasTextureStateListener()
boolean isLoadedToHardware()
boolean isUpdateOnHardwareNeeded()
void load()
void load(GLState pGLState)
void loadToHardware(GLState pGLState)
void reloadToHardware(GLState pGLState)
void setNotLoadedToHardware()
void setTextureStateListener(ITexture.ITextureStateListener pTextureStateListener)
void setUpdateOnHardwareNeeded(boolean pUpdateOnHardwareNeeded)
void unload(GLState pGLState)
void unload()
void unloadFromHardware(GLState pGLState)
Protected Methods
abstract void writeTextureToHardware(GLState pGLState)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.andengine.opengl.texture.ITexture

Constants

public static final int HARDWARE_TEXTURE_ID_INVALID

Constant Value: -1 (0xffffffff)

Fields

protected int mHardwareTextureID

protected final PixelFormat mPixelFormat

protected final TextureManager mTextureManager

protected final TextureOptions mTextureOptions

protected ITexture.ITextureStateListener mTextureStateListener

protected boolean mUpdateOnHardwareNeeded

Public Constructors

public Texture (TextureManager pTextureManager, PixelFormat pPixelFormat, TextureOptions pTextureOptions, ITexture.ITextureStateListener pTextureStateListener)

Parameters
pTextureOptions the (quality) settings of the Texture.
pTextureStateListener to be informed when this Texture is loaded, unloaded or a ITextureAtlasSource failed to load.

Public Methods

public void bind (GLState pGLState, int pGLActiveTexture)

public void bind (GLState pGLState)

public int getHardwareTextureID ()

public PixelFormat getPixelFormat ()

public TextureOptions getTextureOptions ()

public ITexture.ITextureStateListener getTextureStateListener ()

public boolean hasTextureStateListener ()

public boolean isLoadedToHardware ()

public boolean isUpdateOnHardwareNeeded ()

public void load ()

public void load (GLState pGLState)

Throws
IOException

public void loadToHardware (GLState pGLState)

Throws
IOException

public void reloadToHardware (GLState pGLState)

Throws
IOException

public void setNotLoadedToHardware ()

public void setTextureStateListener (ITexture.ITextureStateListener pTextureStateListener)

public void setUpdateOnHardwareNeeded (boolean pUpdateOnHardwareNeeded)

public void unload (GLState pGLState)

public void unload ()

public void unloadFromHardware (GLState pGLState)

Protected Methods

protected abstract void writeTextureToHardware (GLState pGLState)

Throws
IOException