IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

ResourceLoader QML Type

Allows pre-loading of 3D resources.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

ResourceLoader QML Type

  • Import Statement: import QtQuick3D

  • Inherits:: Object3D

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.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+