Package arc.assets.loaders
Class AsynchronousAssetLoader<T,P extends AssetLoaderParameters<T>>
java.lang.Object
arc.assets.loaders.AssetLoader<T,P>
arc.assets.loaders.AsynchronousAssetLoader<T,P>
- Direct Known Subclasses:
CubemapLoader
,CustomLoader
,FontLoader
,FreetypeFontLoader
,I18NBundleLoader
,MusicLoader
,PixmapLoader
,ShaderProgramLoader
,SoundLoader
,TextureLoader
public abstract class AsynchronousAssetLoader<T,P extends AssetLoaderParameters<T>>
extends AssetLoader<T,P>
Base class for asynchronous
AssetLoader
instances. Such loaders try to load parts of an OpenGL resource, like the
Pixmap, on a separate thread to then load the actual resource on the thread the OpenGL context is active on.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
loadAsync
(AssetManager manager, String fileName, Fi file, P parameter) Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.abstract T
loadSync
(AssetManager manager, String fileName, Fi file, P parameter) Loads the OpenGL part of the asset.Methods inherited from class arc.assets.loaders.AssetLoader
getDependencies, resolve
-
Constructor Details
-
AsynchronousAssetLoader
-
-
Method Details
-
loadAsync
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.- Parameters:
fileName
- the name of the asset to loadfile
- the resolved file to loadparameter
- the parameters to use for loading the asset
-
loadSync
Loads the OpenGL part of the asset.- Parameters:
file
- the resolved file to load
-