ResourceLoader QML Type | Qt Quick 3D | Qt 6.10.3
Description: Allows pre-loading of 3D resources.

- Qt 6.10
- Qt Quick 3D
- QML Types
- ResourceLoader
- Qt Quick 3D | Commercial or GPLv3

# ResourceLoader QML Type

Allows pre-loading of 3D resources. More...

Import Statement: | `import QtQuick3D`
Inherits: | Object3D

- List of all members, including inherited members

## Properties

- geometries : List<QtQuick3D::Geometry>
- meshSources : List<url>
- textures : List<QtQuick3D::Texture>

## Detailed Description

ResourceLoader is used to pre-load resources for Qt Quick 3D. Normally resources are only loaded when they are needed to render a frame, and are unloaded when they are not used to render the scene. This aggressive approach to resource lifetimes means that only the bare minimum of GPU resources are used to render a frame, but for some dynamic scenes this can lead to resources being loaded and released frequently. The ResourceLoader component enables a finer grain control on the lifetimes of resources in the scene. Resources listed in the ResourceLoader component are loaded into GPU memory and will remain there until they are removed from the ResourceLoader lists or the ResourceLoader is destroyed.

ResourceLoader can also be used to make sure that large resources are available before rendering a frame. Since resources are loaded only when needed for a frame, this can lead to frames being dropped waiting for a large resource to be loaded. By pre-loading large resources before showing a scene, there is no risk of dropping any frames due to resources being loaded during an animation.

For usage examples, see Qt Quick 3D - Principled Material Example

## Property Documentation

geometries : List<QtQuick3D::Geometry>

This property defines a list of Geometry resources that will be loaded to the GPU and cached.

meshSources : List<url>

This property defines a list of locations of mesh files containing geometry. When a mesh file is added to this list, it will be loaded to the GPU and cached. If these same mesh files are source is used by a /c Model they will not need to be loaded again.

textures : List<QtQuick3D::Texture>

This property defines a list of Texture resources that will be loaded to the GPU and cached.