ResourceLoader
ResourceLoader loads external resources referenced by glTF assets.
ResourceLoader handles:
Loading textures from URIs
Uploading vertex/index buffer data
Computing tangent quaternions (via Mikktspace when needed)
Async resource loading for progressive rendering
Typical usage:
val resourceLoader = ResourceLoader(engine)
resourceLoader.loadResources(asset) // Synchronously load all resources
resourceLoader.destroy()Async usage:
resourceLoader.asyncBeginLoad(asset)
while (resourceLoader.asyncGetLoadProgress() < 1.0f) {
resourceLoader.asyncUpdateLoad() // Load in chunks
}See also
ResourceLoader loads external resources referenced by glTF assets.
ResourceLoader handles:
Loading textures from URIs
Uploading vertex/index buffer data
Computing tangent quaternions (via Mikktspace when needed)
Async resource loading for progressive rendering
Typical usage:
val resourceLoader = ResourceLoader(engine)
resourceLoader.loadResources(asset) // Synchronously load all resources
resourceLoader.destroy()Async usage:
resourceLoader.asyncBeginLoad(asset)
while (resourceLoader.asyncGetLoadProgress() < 1.0f) {
resourceLoader.asyncUpdateLoad() // Load in chunks
}See also
ResourceLoader loads external resources referenced by glTF assets.
ResourceLoader handles:
Loading textures from URIs
Uploading vertex/index buffer data
Computing tangent quaternions (via Mikktspace when needed)
Async resource loading for progressive rendering
Typical usage:
val resourceLoader = ResourceLoader(engine)
resourceLoader.loadResources(asset) // Synchronously load all resources
resourceLoader.destroy()Async usage:
resourceLoader.asyncBeginLoad(asset)
while (resourceLoader.asyncGetLoadProgress() < 1.0f) {
resourceLoader.asyncUpdateLoad() // Load in chunks
}See also
ResourceLoader loads external resources referenced by glTF assets.
ResourceLoader handles:
Loading textures from URIs
Uploading vertex/index buffer data
Computing tangent quaternions (via Mikktspace when needed)
Async resource loading for progressive rendering
Typical usage:
val resourceLoader = ResourceLoader(engine)
resourceLoader.loadResources(asset) // Synchronously load all resources
resourceLoader.destroy()Async usage:
resourceLoader.asyncBeginLoad(asset)
while (resourceLoader.asyncGetLoadProgress() < 1.0f) {
resourceLoader.asyncUpdateLoad() // Load in chunks
}See also
ResourceLoader loads external resources referenced by glTF assets.
ResourceLoader handles:
Loading textures from URIs
Uploading vertex/index buffer data
Computing tangent quaternions (via Mikktspace when needed)
Async resource loading for progressive rendering
Typical usage:
val resourceLoader = ResourceLoader(engine)
resourceLoader.loadResources(asset) // Synchronously load all resources
resourceLoader.destroy()Async usage:
resourceLoader.asyncBeginLoad(asset)
while (resourceLoader.asyncGetLoadProgress() < 1.0f) {
resourceLoader.asyncUpdateLoad() // Load in chunks
}See also
Functions
Feeds the binary content of an external resource into the loader's URI cache.
Feeds the binary content of an external resource into the loader's URI cache.
Feeds the binary content of an external resource into the loader's URI cache.
Feeds the binary content of an external resource into the loader's URI cache.
Feeds the binary content of an external resource into the loader's URI cache.
Starts an asynchronous resource load (texture decoding may use worker threads). Requires periodic calls to asyncUpdateLoad until asyncGetLoadProgress reaches 1.0.
Starts an asynchronous resource load (texture decoding may use worker threads). Requires periodic calls to asyncUpdateLoad until asyncGetLoadProgress reaches 1.0.
Starts an asynchronous resource load (texture decoding may use worker threads). Requires periodic calls to asyncUpdateLoad until asyncGetLoadProgress reaches 1.0.
Starts an asynchronous resource load (texture decoding may use worker threads). Requires periodic calls to asyncUpdateLoad until asyncGetLoadProgress reaches 1.0.
Starts an asynchronous resource load (texture decoding may use worker threads). Requires periodic calls to asyncUpdateLoad until asyncGetLoadProgress reaches 1.0.
Cancels pending decoder jobs, frees all CPU-side texel data, and flushes the Engine. Only needed if asyncBeginLoad was used and cancellation is required before completion.
Cancels pending decoder jobs, frees all CPU-side texel data, and flushes the Engine. Only needed if asyncBeginLoad was used and cancellation is required before completion.
Cancels pending decoder jobs, frees all CPU-side texel data, and flushes the Engine. Only needed if asyncBeginLoad was used and cancellation is required before completion.
Cancels pending decoder jobs, frees all CPU-side texel data, and flushes the Engine. Only needed if asyncBeginLoad was used and cancellation is required before completion.
Cancels pending decoder jobs, frees all CPU-side texel data, and flushes the Engine. Only needed if asyncBeginLoad was used and cancellation is required before completion.
Gets the status of an asynchronous load as a percentage in [0, 1].
Gets the status of an asynchronous load as a percentage in [0, 1].
Gets the status of an asynchronous load as a percentage in [0, 1].
Gets the status of an asynchronous load as a percentage in [0, 1].
Gets the status of an asynchronous load as a percentage in [0, 1].
Performs any pending main-thread work of an asynchronous load. Call periodically until asyncGetLoadProgress returns 1.0; harmless after that.
Performs any pending main-thread work of an asynchronous load. Call periodically until asyncGetLoadProgress returns 1.0; harmless after that.
Performs any pending main-thread work of an asynchronous load. Call periodically until asyncGetLoadProgress returns 1.0; harmless after that.
Performs any pending main-thread work of an asynchronous load. Call periodically until asyncGetLoadProgress returns 1.0; harmless after that.
Performs any pending main-thread work of an asynchronous load. Call periodically until asyncGetLoadProgress returns 1.0; harmless after that.
Destroys this loader and frees its internal caches. Must happen on the same thread that calls Renderer.render(), because the loader listens to buffer callbacks to know when CPU-side data blobs can be freed.
Destroys this loader and frees its internal caches. Must happen on the same thread that calls Renderer.render(), because the loader listens to buffer callbacks to know when CPU-side data blobs can be freed.
Destroys this loader and frees its internal caches. Must happen on the same thread that calls Renderer.render(), because the loader listens to buffer callbacks to know when CPU-side data blobs can be freed.
Destroys this loader and frees its internal caches. Must happen on the same thread that calls Renderer.render(), because the loader listens to buffer callbacks to know when CPU-side data blobs can be freed.
Destroys this loader and frees its internal caches. Must happen on the same thread that calls Renderer.render(), because the loader listens to buffer callbacks to know when CPU-side data blobs can be freed.
Frees memory by evicting the URI cache populated via addResourceData. Call only after a model is fully loaded or loading has been cancelled.
Frees memory by evicting the URI cache populated via addResourceData. Call only after a model is fully loaded or loading has been cancelled.
Frees memory by evicting the URI cache populated via addResourceData. Call only after a model is fully loaded or loading has been cancelled.
Frees memory by evicting the URI cache populated via addResourceData. Call only after a model is fully loaded or loading has been cancelled.
Frees memory by evicting the URI cache populated via addResourceData. Call only after a model is fully loaded or loading has been cancelled.
Checks whether the given resource URI has already been added via addResourceData.
Checks whether the given resource URI has already been added via addResourceData.
Checks whether the given resource URI has already been added via addResourceData.
Checks whether the given resource URI has already been added via addResourceData.
Checks whether the given resource URI has already been added via addResourceData.
Synchronously loads resources for asset from the URI cache and finalizes the asset: transforms vertex data if necessary, decodes images, and supplies tangent data.
Synchronously loads resources for asset from the URI cache and finalizes the asset: transforms vertex data if necessary, decodes images, and supplies tangent data.
Synchronously loads resources for asset from the URI cache and finalizes the asset: transforms vertex data if necessary, decodes images, and supplies tangent data.
Synchronously loads resources for asset from the URI cache and finalizes the asset: transforms vertex data if necessary, decodes images, and supplies tangent data.
Synchronously loads resources for asset from the URI cache and finalizes the asset: transforms vertex data if necessary, decodes images, and supplies tangent data.