ResourceLoader QML Type
Allows pre-loading of 3D resources. More...
|Import Statement:||import QtQuick3D|
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
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.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.