Package com.badlogic.gdx.assets.loaders
Class CubemapLoader
- java.lang.Object
-
- com.badlogic.gdx.assets.loaders.AssetLoader<T,P>
-
- com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader<Cubemap,CubemapLoader.CubemapParameter>
-
- com.badlogic.gdx.assets.loaders.CubemapLoader
-
public class CubemapLoader extends AsynchronousAssetLoader<Cubemap,CubemapLoader.CubemapParameter>
AssetLoader
forCubemap
instances. The pixel data is loaded asynchronously. The texture is then created on the rendering thread, synchronously. Passing aCubemapLoader.CubemapParameter
toAssetManager.load(String, Class, AssetLoaderParameters)
allows one to specify parameters as can be passed to the various Cubemap constructors, e.g. filtering and so on.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CubemapLoader.CubemapLoaderInfo
static class
CubemapLoader.CubemapParameter
-
Constructor Summary
Constructors Constructor Description CubemapLoader(FileHandleResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Array<AssetDescriptor>
getDependencies(java.lang.String fileName, FileHandle file, CubemapLoader.CubemapParameter parameter)
Returns the assets this asset requires to be loaded first.void
loadAsync(AssetManager manager, java.lang.String fileName, FileHandle file, CubemapLoader.CubemapParameter parameter)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.Cubemap
loadSync(AssetManager manager, java.lang.String fileName, FileHandle file, CubemapLoader.CubemapParameter parameter)
Loads the OpenGL part of the asset.-
Methods inherited from class com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader
unloadAsync
-
Methods inherited from class com.badlogic.gdx.assets.loaders.AssetLoader
resolve
-
-
-
-
Constructor Detail
-
CubemapLoader
public CubemapLoader(FileHandleResolver resolver)
-
-
Method Detail
-
loadAsync
public void loadAsync(AssetManager manager, java.lang.String fileName, FileHandle file, CubemapLoader.CubemapParameter parameter)
Description copied from class:AsynchronousAssetLoader
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.- Specified by:
loadAsync
in classAsynchronousAssetLoader<Cubemap,CubemapLoader.CubemapParameter>
fileName
- the name of the asset to loadfile
- the resolved file to loadparameter
- the parameters to use for loading the asset
-
loadSync
public Cubemap loadSync(AssetManager manager, java.lang.String fileName, FileHandle file, CubemapLoader.CubemapParameter parameter)
Description copied from class:AsynchronousAssetLoader
Loads the OpenGL part of the asset.- Specified by:
loadSync
in classAsynchronousAssetLoader<Cubemap,CubemapLoader.CubemapParameter>
file
- the resolved file to load
-
getDependencies
public Array<AssetDescriptor> getDependencies(java.lang.String fileName, FileHandle file, CubemapLoader.CubemapParameter parameter)
Description copied from class:AssetLoader
Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.- Specified by:
getDependencies
in classAssetLoader<Cubemap,CubemapLoader.CubemapParameter>
- Parameters:
fileName
- name of the asset to loadfile
- the resolved file to loadparameter
- parameters for loading the asset- Returns:
- other assets that the asset depends on and need to be loaded first or null if there are no dependencies.
-
-