public class TextureLoader extends AsynchronousAssetLoader<Texture,TextureLoader.TextureParameter>
AssetLoader for Texture instances. The pixel data is loaded asynchronously. The texture is then created on the
rendering thread, synchronously. Passing a TextureLoader.TextureParameter to
AssetManager.load(String, Class, AssetLoaderParameters) allows one to specify parameters as can be passed to the
various Texture constructors, e.g. filtering, whether to generate mipmaps and so on.| Modifier and Type | Class and Description |
|---|---|
static class |
TextureLoader.TextureParameter |
| Constructor and Description |
|---|
TextureLoader(FileHandleResolver resolver) |
| Modifier and Type | Method and Description |
|---|---|
Array<AssetDescriptor> |
getDependencies(java.lang.String fileName,
TextureLoader.TextureParameter parameter) |
void |
loadAsync(AssetManager manager,
java.lang.String fileName,
TextureLoader.TextureParameter parameter)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
|
Texture |
loadSync(AssetManager manager,
java.lang.String fileName,
TextureLoader.TextureParameter parameter)
Loads th
|
resolvepublic TextureLoader(FileHandleResolver resolver)
public void loadAsync(AssetManager manager, java.lang.String fileName, TextureLoader.TextureParameter parameter)
AsynchronousAssetLoaderloadAsync in class AsynchronousAssetLoader<Texture,TextureLoader.TextureParameter>fileName - the name of the asset to loadparameter - the parameters to use for loading the assetpublic Texture loadSync(AssetManager manager, java.lang.String fileName, TextureLoader.TextureParameter parameter)
AsynchronousAssetLoaderloadSync in class AsynchronousAssetLoader<Texture,TextureLoader.TextureParameter>public Array<AssetDescriptor> getDependencies(java.lang.String fileName, TextureLoader.TextureParameter parameter)
getDependencies in class AssetLoader<Texture,TextureLoader.TextureParameter>fileName - name of the asset to loadparameter - parameters for loading the asset