← Back to Docs
  • index.html
  • Clayground
  • Clayground.Canvas3D
  • PerfHud
  • Clayground 2026.2
  • PerfHud QML Type

    Compact always-on-top performance overlay for a View3D. More...

    Import Statement: import Clayground.Canvas3D

    Properties

    Detailed Description

    PerfHud is a plain QtQuick Item (not a 3D node) that you parent into your scene's 2D overlay layer. It reads live rendering metrics from the renderStats of the referenced View3D and shows them in a small dark translucent panel using the Clayground palette.

    Metrics shown: frames per second, frame time, CPU sync/prepare/render times, GPU time, draw calls and drawn vertices. Draw-call and vertex counts require extended data collection, which PerfHud enables automatically on the target's renderStats.

    Example usage:

    import QtQuick
    import QtQuick3D
    import Clayground.Canvas3D
    
    View3D {
        id: view
        anchors.fill: parent
    
        PerfHud {
            view3D: view
            extended: false
            anchors.top: parent.top
            anchors.right: parent.right
            anchors.margins: 12
        }
    }

    See also BenchLogger.

    Property Documentation

    extended : bool

    When true, additionally shows Qt's DebugView with resource details next to the compact panel.


    view3D : var

    The View3D whose renderStats are displayed. Required.