diff options
author | Tony Leinonen <tony.leinonen@qt.io> | 2021-03-24 11:04:48 +0200 |
---|---|---|
committer | Tony Leinonen <tony.leinonen@qt.io> | 2021-03-30 11:57:20 +0000 |
commit | 750e8694178554437fcf7eef1a03d7e4abc51471 (patch) | |
tree | 69287c60b78b0d1e24817f0f4eb97756e3962b0e | |
parent | 9c62fa3b6190991e7594da9a4d8b39e3ff8b5c2f (diff) |
Add documentation for frameDraw signal
The frameDraw was recently added and needed further documentation.
Task-number: QT3DS-4220
Change-Id: Ic2bcfb112fdd91455e8c30437bfd652f1215d803
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/api/studio3d/q3dssurfaceviewer.cpp | 3 | ||||
-rw-r--r-- | src/api/studio3dqml/q3dsstudio3d.cpp | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/api/studio3d/q3dssurfaceviewer.cpp b/src/api/studio3d/q3dssurfaceviewer.cpp index 1dac70f..2d7846c 100644 --- a/src/api/studio3d/q3dssurfaceviewer.cpp +++ b/src/api/studio3d/q3dssurfaceviewer.cpp @@ -367,8 +367,9 @@ void Q3DSSurfaceViewer::setQmlEngine(QQmlEngine *qmlEngine) /*! \fn Q3DSSurfaceViewer::frameDraw() + \since Qt 3D Studio 2.8 - Emitted each time a frame has been updated and renderer has drawn to it. + Emitted each time a new image has been drawn for Renderer. */ /*! diff --git a/src/api/studio3dqml/q3dsstudio3d.cpp b/src/api/studio3dqml/q3dsstudio3d.cpp index 503b713..815535c 100644 --- a/src/api/studio3dqml/q3dsstudio3d.cpp +++ b/src/api/studio3dqml/q3dsstudio3d.cpp @@ -114,6 +114,13 @@ QT_BEGIN_NAMESPACE */ /*! + \qmlsignal Studio3D::frameDraw() + \since QtStudio3D.OpenGL 2.8 + + This signal is emitted each time a new image has been drawn. +*/ + +/*! \qmlsignal Studio3D::frameUpdate() This signal is emitted each time a frame has been rendered. @@ -463,7 +470,8 @@ bool Q3DSStudio3D::isRunning() const Emit QML `runningChanged` and `frameUpdate` and signals. This method is called every frame, and emits the `frameUpdate` signal every frame, regardless of plugin visibility. This allows a hidden Qt3DSView to still process - information every frame, even though the Renderer is not rendering. + information every frame, even though the Renderer is not rendering. You can use + frameDraw signal when you need to know when a new image has been drawn. To prevent expensive onFrameUpdate handlers from being processed when hidden, add an early return to the top like: |