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 Details

  • Method Details

    • loadAsync

      public abstract 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.
      Parameters:
      fileName - the name of the asset to load
      file - the resolved file to load
      parameter - the parameters to use for loading the asset
    • loadSync

      public abstract T loadSync(AssetManager manager, String fileName, Fi file, P parameter)
      Loads the OpenGL part of the asset.
      Parameters:
      file - the resolved file to load