| 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(IGLApi glApi)
Unload from gpu and remove from this
TextureList all textures |
void |
destroyUnreferenced(IGLApi glApi)
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(IGLApi glApi)
Load textures read in cpu.
|
void |
load(IGLApi glApi,
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(IGLApi glApi,
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(IGLApi glApi,
Texture texture) |
void |
unload(IGLApi glApi,
Texture texture,
boolean remove) |
void |
unloadAll(IGLApi glApi)
Unload all textures from gpu
|
TextureID |
unloadExternal(Texture texture) |
void |
unloadUnreferenced(IGLApi glApi)
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(IGLApi glApi)
@Deprecated public final void readAndLoad(IGLApi glApi, Finder finder, Texture texture, TextureParam textureParam)
gl - opengl contextfinder - texture - textureParam - texture parameters or nullpublic final void destroyAll(IGLApi glApi)
TextureList all texturespublic final void destroyUnreferenced(IGLApi glApi)
TextureList unreferenced texturespublic final void unloadAll(IGLApi glApi)
public final void unloadUnreferenced(IGLApi glApi)
public final void unload(IGLApi glApi, Texture texture)
texture - Texture to unload from this TextureListpublic final void unload(IGLApi glApi, 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.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com