Search in sources :

Example 1 with AssetInputStreamOpener

use of org.andengine.util.adt.io.in.AssetInputStreamOpener in project AndEngine by nicolasgramlich.

the class TextureManager method getTexture.

public synchronized ITexture getTexture(final String pID, final AssetManager pAssetManager, final String pAssetPath, final TextureOptions pTextureOptions) throws IOException {
    if (this.hasMappedTexture(pID)) {
        return this.getMappedTexture(pID);
    } else {
        final ITexture texture = new BitmapTexture(this, new AssetInputStreamOpener(pAssetManager, pAssetPath), pTextureOptions);
        this.loadTexture(texture);
        this.addMappedTexture(pID, texture);
        return texture;
    }
}
Also used : AssetInputStreamOpener(org.andengine.util.adt.io.in.AssetInputStreamOpener) BitmapTexture(org.andengine.opengl.texture.bitmap.BitmapTexture)

Aggregations

BitmapTexture (org.andengine.opengl.texture.bitmap.BitmapTexture)1 AssetInputStreamOpener (org.andengine.util.adt.io.in.AssetInputStreamOpener)1