- Qt 6.11
- Qt Quick 3D
- QML Types
- RenderStats
- Qt Quick 3D | Commercial or GPLv3

# RenderStats QML Type

Provides information of the scene rendering. More...

Import Statement: | `import QtQuick3D`

- List of all members, including inherited members

## Properties

- drawCallCount : quint64 `(since 6.5)`
- drawVertexCount : quint64 `(since 6.5)`
- effectGenerationTime : qint64 `(since 6.5)`
- extendedDataCollectionEnabled : bool `(since 6.5)`
- fps : int
- frameTime : real
- graphicsAPIName : string `(since 6.5)`
- imageDataSize : quint64 `(since 6.5)`
- lastCompletedGpuTime : real `(since 6.6)`
- materialGenerationTime : qint64 `(since 6.5)`
- maxFrameTime : real
- meshDataSize : quint64 `(since 6.5)`
- pipelineCount : int `(since 6.5)`
- pipelineCreationTime : qint64 `(since 6.5)`
- renderPassCount : int `(since 6.5)`
- renderPrepareTime : real
- renderTime : real
- syncTime : real
- vmemAllocCount : quint32 `(since 6.5)`
- vmemUsedBytes : quint64 `(since 6.5)`

## Detailed Description

The RenderStats type provides information about scene rendering statistics. This cannot be created directly, but can be retrieved from a View3D.

Use the DebugView item to display the data on-screen.

## Property Documentation

### drawCallCount : quint64 `[read-only, since 6.5]`

This property holds the total number of draw calls (including non-indexed, indexed, instanced, and instanced indexed draw calls) that were registered during the last render of the View3D.

The value is updated only when extendedDataCollectionEnabled is enabled.

This property was introduced in Qt 6.5.

### drawVertexCount : quint64 `[read-only, since 6.5]`

This property holds the total number of vertices in draw calls that were registered during the last render of the View3D.

The value includes the number of vertex and index count from draw calls that were registered during the last render of the View3D. While the number is not guaranteed to be totally accurate, it is expected to give a good indication of the complexity of the scene rendering.

The value is updated only when extendedDataCollectionEnabled is enabled.

This property was introduced in Qt 6.5.

### effectGenerationTime : qint64 `[read-only, since 6.5]`

This property holds the total number of milliseconds spent on generating and processing shader code for post-processing effects in the window the View3D belongs to.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### extendedDataCollectionEnabled : bool `[since 6.5]`

This property controls if render pass and draw call statistics are processed and made available. This may incur a small performance cost and is therefore optional.

Properties such as drawCallCount, drawVertexCount, or renderPassCount are updated only when this property is set to true.

The default value is false.

Note: Changing the visibility of a DebugView associated with the View3D automatically toggles the value based on the DebugView's visible property.

This property was introduced in Qt 6.5.

### fps : int `[read-only]`

This property holds the number of frames rendered during the last second.

### frameTime : real `[read-only]`

This property holds the amount of time elapsed since the last frame, in milliseconds.

### graphicsAPIName : string `[read-only, since 6.5]`

This property holds the name of the current graphics API (RHI) backend currently in use.

This property was introduced in Qt 6.5.

### imageDataSize : quint64 `[read-only, since 6.5]`

This property holds the approximate size in bytes of the image data for texture maps currently registered with the View3D's window. The value is per-window, meaning if there are multiple View3D objects within the same QQuickWindow, those will likely report the same value.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### lastCompletedGpuTime : real `[read-only, since 6.6]`

When GPU timing collection is enabled in Qt Quick, and the relevant features are supported by the underlying graphics API, this property contains the last retrieved elapsed GPU time in milliseconds.

Note: The value is retrieved asynchronously, and usually refers to a frame older than the previous one, meaning that the value is not necessarily in sync with the other, CPU-side timings.

Note: The result is based on the rendering of the entire contents of the QQuickWindow the View3D belongs to. It includes all the contents of Qt Quick scene, including all 2D elements and all View3D items within that window.

This property was introduced in Qt 6.6.

See also QQuickGraphicsConfiguration::setTimestamps().

### materialGenerationTime : qint64 `[read-only, since 6.5]`

This property holds the total number of milliseconds spent on generating and processing shader code for DefaultMaterial, PrincipledMaterial, and CustomMaterial in the window the View3D belongs to.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### maxFrameTime : real `[read-only]`

This property holds the maximum time spent rendering a single frame during the last second.

### meshDataSize : quint64 `[read-only, since 6.5]`

This property holds the approximate size in bytes of the mesh data currently registered with the View3D's window. The value is per-window, meaning if there are multiple View3D objects within the same QQuickWindow, those will likely report the same value.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### pipelineCount : int `[read-only, since 6.5]`

This property holds the total number of cached graphics pipelines for the window the View3D belongs to.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### pipelineCreationTime : qint64 `[read-only, since 6.5]`

This property holds the total number of milliseconds spent on creating graphics pipelines on the rendering hardware interface level. This can include, among other things: compilation times for compiling HLSL to an intermediate format, compiling MSL, compiling GLSL code with glCompileShader or linking using program binaries, and generating Vulkan pipelines with all that entails (e.g. SPIR-V -> ISA compilation). The value reflects all Qt Quick and Qt Quick 3D rendering in the window the View3D belongs to.

Note: The value includes operations that are under Qt's control. Depending on the underlying graphics API, some pipeline (shader, graphics state) related operations may happen asynchronously, and may be affected by caching on various levels in the graphics stack. Releasing cached resource by calling QQuickWindow::releaseResources() or clicking the corresponding DebugView button may also have varying results, depending on the underlying details (rhi backend, graphics API); it may or may not affect this counter due to a varying number of factors.

This timing is provided as a general, high level indication. Combined with materialGenerationTime, application developers can use these values to confirm that the time spent on material and graphics pipeline processing is reasonably low during the normal use of the application, once all caches (both persistent and in-memory) are warm. Avoid drawing conclusions from the first run of the application. (since that may not benefit from persistent, disk-based caches yet)

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### renderPassCount : int `[read-only, since 6.5]`

This property holds the total number of render passes that were registered during the last render of the View3D.

Many features, such as realtime shadow mapping, postprocessing effects, the depth and screen textures, and certain antialiasing methods involve multiple additional render passes. While the number is not guaranteed to include absolutely all render passes, it is expected to give a good indication of the complexity of the scene rendering.

The value is updated only when extendedDataCollectionEnabled is enabled.

This property was introduced in Qt 6.5.

### renderPrepareTime : real `[read-only]`

This property holds the amount of time spent in the preparation phase of rendering, in milliseconds. This is a subset of the total render time reported in renderTime.

### renderTime : real `[read-only]`

This property holds the amount of time spent on generating a new frame, including both the preparation phase and the recording of draw calls. The value is in milliseconds.

### syncTime : real `[read-only]`

This property holds the amount of time spent inside the sync function, in milliseconds. The property values of the objects are updated during the sync.

### vmemAllocCount : quint32 `[read-only, since 6.5]`

When applicable, the number of allocations made by the graphics memory allocator library. This includes allocations from all Qt Quick and Qt Quick 3D rendering in the QQuickWindow to which the View3D belongs. The value is zero with graphics APIs such as OpenGL, Direct3D, and Metal because memory allocation is not under Qt's control then.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

### vmemUsedBytes : quint64 `[read-only, since 6.5]`

When applicable, the number of bytes used by allocations made by the graphics memory allocator library. This includes allocations from all Qt Quick and Qt Quick 3D rendering in the QQuickWindow to which the View3D belongs. The value is zero with graphics APIs such as OpenGL, Direct3D, and Metal because memory allocation is not under Qt's control then.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.