| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CUBEMAP_EXT |
static java.lang.String[] |
CUBEMAP_SUFFIXE |
static java.lang.String |
DOT3_EXT |
| Constructor and Description |
|---|
TextureList(TextureLoader textureLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOnLoadListener(OnLoadListener<Texture> listener)
Register an
OnLoadListener listener to be notified of texture loading. |
void |
destroyAll(IGL gl)
Unload from gpu and remove from this
TextureList all textures |
void |
destroyUnreferenced(IGL gl)
Unload from gpu and remove from this
TextureList unreferenced textures |
Texture |
get(java.lang.String name) |
TextureParam |
getDefaultTextureParam() |
int |
getNumLoadedTextures() |
TextureLibrary |
getTextureLibrary() |
TextureLoader |
getTextureLoader() |
ITexture[] |
getTextureSw(Texture texture)
Deprecated.
|
boolean |
hasPendingLoading() |
boolean |
isPendingLoading(Texture texture) |
java.util.Iterator<TextureID> |
iterator() |
int |
load(IGL gl)
Load textures read in cpu.
|
void |
load(IGL gl,
Texture texture) |
static java.lang.String[] |
mapNameToFileName(java.lang.String name) |
void |
onContextLost() |
boolean |
read(Finder finder,
Texture texture,
TextureParam textureParam)
Read texture in cpu, an OpenGL context is not needed.
|
boolean |
read(Finder finder,
Texture texture,
TextureParam textureParam,
boolean reRead) |
void |
read(Texture texture,
ITexture[] textures,
TextureParam textureParam) |
void |
readAndLoad(IGL gl,
Finder finder,
Texture texture,
TextureParam textureParam)
Deprecated.
|
void |
removeOnLoadListener(OnLoadListener<Texture> listener) |
void |
resetFailures() |
TextureList |
setDefaultTextureParam(TextureParam defaultTextureParam) |
TextureList |
setTextureLibrary(TextureLibrary textureLibrary) |
java.lang.Iterable<Texture> |
textureIterable() |
void |
unload(IGL gl,
Texture texture) |
void |
unload(IGL gl,
Texture texture,
boolean remove) |
void |
unloadAll(IGL gl)
Unload all textures from gpu
|
TextureID |
unloadExternal(Texture texture) |
void |
unloadUnreferenced(IGL gl)
Unload unreferenced textures from gpu
|
Texture |
use(java.lang.String name)
Get the
Texture with the specified name and increment its reference counting. |
public static final java.lang.String DOT3_EXT
public static final java.lang.String CUBEMAP_EXT
public static final java.lang.String[] CUBEMAP_SUFFIXE
public TextureList(TextureLoader textureLoader)
public final Texture use(java.lang.String name)
Texture with the specified name and increment its reference counting.Texture.release() must be called when the texture is not used anymore.Texture with the specified name, with reference count incrementedpublic final Texture get(java.lang.String name)
Texture with the specified namepublic final boolean read(Finder finder, Texture texture, TextureParam textureParam)
#loadTextures(IGL)finder - finder to search the texturetexture - texture to readtextureParam - optional texture param for loading texture on gpupublic final boolean read(Finder finder, Texture texture, TextureParam textureParam, boolean reRead)
reRead - true if the texture should be re-read if already loaded to gpu (or has failed before)read(Finder, Texture, TextureParam)public final void read(Texture texture, ITexture[] textures, TextureParam textureParam)
public final boolean hasPendingLoading()
load(IGL)public final boolean isPendingLoading(Texture texture)
@Deprecated public final ITexture[] getTextureSw(Texture texture)
public final int load(IGL gl)
@Deprecated public final void readAndLoad(IGL gl, Finder finder, Texture texture, TextureParam textureParam)
gl - opengl contextfinder - texture - textureParam - texture parameters or nullpublic final void destroyAll(IGL gl)
TextureList all texturespublic final void destroyUnreferenced(IGL gl)
TextureList unreferenced texturespublic final void unloadAll(IGL gl)
public final void unloadUnreferenced(IGL gl)
public final void unload(IGL gl, Texture texture)
texture - Texture to unload from this TextureListpublic final void unload(IGL gl, Texture texture, boolean remove)
texture - Texture to unload from this TextureListremove - true to remove/destroy the texture from this TextureListpublic final void onContextLost()
public final java.util.Iterator<TextureID> iterator()
iterator in interface java.lang.Iterable<TextureID>public final java.lang.Iterable<Texture> textureIterable()
public final int getNumLoadedTextures()
public final void resetFailures()
public final TextureLoader getTextureLoader()
public final void addOnLoadListener(OnLoadListener<Texture> listener)
OnLoadListener listener to be notified of texture loading.listener - OnLoadListener listener to registerpublic final void removeOnLoadListener(OnLoadListener<Texture> listener)
listener - OnLoadListener listener to removepublic final TextureParam getDefaultTextureParam()
public final TextureList setDefaultTextureParam(TextureParam defaultTextureParam)
public final TextureLibrary getTextureLibrary()
public final TextureList setTextureLibrary(TextureLibrary textureLibrary)
public static java.lang.String[] mapNameToFileName(java.lang.String name)
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com