Provides information of the scene rendering. 更多...
import 语句: | import QtQuick3D |
The RenderStats type provides information about scene rendering statistics. This cannot be created directly, but can be retrieved from a View3D .
使用 DebugView item to display the data on-screen.
[read-only, since 6.5] drawCallCount : quint64 |
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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] drawVertexCount : quint64 |
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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] effectGenerationTime : qint64 |
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.
注意: 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.
该特性在 Qt 6.5 引入。
[since 6.5] extendedDataCollectionEnabled : bool |
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 ,或 renderPassCount are updated only when this property is set to true.
默认值为 false。
注意: Changing the visibility of a DebugView associated with the View3D automatically toggles the value based on the DebugView 's visible 特性。
该特性在 Qt 6.5 引入。
[read-only] fps : int |
This property holds the number of frames rendered during the last second.
[read-only] frameTime : float |
This property holds the amount of time elapsed since the last frame, in milliseconds.
[read-only, since 6.5] graphicsAPIName : string |
This property holds the name of the current graphics API (RHI) backend currently in use.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] imageDataSize : quint64 |
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.
注意: 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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] materialGenerationTime : qint64 |
This property holds the total number of milliseconds spent on generating and processing shader code for DefaultMaterial , PrincipledMaterial ,和 CustomMaterial in the window the View3D belongs to.
The value is updated only when extendedDataCollectionEnabled is enabled.
注意: 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.
该特性在 Qt 6.5 引入。
[read-only] maxFrameTime : float |
This property holds the maximum time spent rendering a single frame during the last second.
[read-only, since 6.5] meshDataSize : quint64 |
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.
注意: 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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] pipelineCount : int |
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.
注意: 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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] pipelineCreationTime : qint64 |
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.
注意: 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.
注意: 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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] renderPassCount : int |
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.
该特性在 Qt 6.5 引入。
[read-only] renderPrepareTime : float |
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 .
[read-only] renderTime : float |
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.
[read-only] syncTime : float |
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.
[read-only, since 6.5] vmemAllocCount : quint32 |
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.
注意: 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.
该特性在 Qt 6.5 引入。
[read-only, since 6.5] vmemUsedBytes : quint64 |
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.
注意: 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.
该特性在 Qt 6.5 引入。