diff options
author | Liang Qi <liang.qi@qt.io> | 2017-12-08 13:54:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-12-08 13:54:31 +0100 |
commit | 8470becd886d299c1be892d8113dfff216035611 (patch) | |
tree | 7801c818f81371c5d75e83cab97b12a0a27adfb0 /src/render/framegraph | |
parent | 94e6ed7c49fae6d7273f4bb51a70e43430038ee9 (diff) | |
parent | 7bd57d2218794fdd7bcaa4f2c8107ef60740ff75 (diff) |
Merge remote-tracking branch 'origin/5.10.0' into 5.10
Change-Id: I58cb37d5de618ad5e9b9a6f0598a0d790d3694f9
Diffstat (limited to 'src/render/framegraph')
-rw-r--r-- | src/render/framegraph/qrendercapture.cpp | 28 | ||||
-rw-r--r-- | src/render/framegraph/qrendercapture.h | 7 |
2 files changed, 28 insertions, 7 deletions
diff --git a/src/render/framegraph/qrendercapture.cpp b/src/render/framegraph/qrendercapture.cpp index 66c518506..28bc41b91 100644 --- a/src/render/framegraph/qrendercapture.cpp +++ b/src/render/framegraph/qrendercapture.cpp @@ -149,6 +149,15 @@ namespace Qt3DRender { */ /*! + * \qmlmethod RenderCaptureReply Qt3D.Render::RenderCapture::requestCapture(Rect rect) + * + * Used to request render capture from a specified \a rect. Only one render capture + * result is produced per requestCapture call even if the frame graph has multiple leaf nodes. + * The function returns a QRenderCaptureReply object, which receives the captured image + * when it is done. The user is responsible for deallocating the returned object. + */ + +/*! * \internal */ QRenderCaptureReplyPrivate::QRenderCaptureReplyPrivate() @@ -311,7 +320,7 @@ QRenderCapture::QRenderCapture(Qt3DCore::QNode *parent) * The function returns a QRenderCaptureReply object, which receives the captured image * when it is done. The user is responsible for deallocating the returned object. */ -QRenderCaptureReply *QRenderCapture::requestCapture(int captureId, const QRect &rect) +QRenderCaptureReply *QRenderCapture::requestCapture(int captureId) { Q_D(QRenderCapture); QRenderCaptureReply *reply = d->createReply(captureId); @@ -322,7 +331,7 @@ QRenderCaptureReply *QRenderCapture::requestCapture(int captureId, const QRect & Qt3DCore::QPropertyUpdatedChangePtr change(new Qt3DCore::QPropertyUpdatedChange(id())); change->setPropertyName(QByteArrayLiteral("renderCaptureRequest")); - const QRenderCaptureRequest request = { captureId, rect }; + const QRenderCaptureRequest request = { captureId, QRect() }; change->setValue(QVariant::fromValue(request)); d->notifyObservers(change); @@ -330,8 +339,8 @@ QRenderCaptureReply *QRenderCapture::requestCapture(int captureId, const QRect & } /*! - * Used to request render capture. Only one render capture result is produced per - * requestCapture call even if the frame graph has multiple leaf nodes. + * Used to request render capture from a specified \a rect. Only one render capture result + * is produced per requestCapture call even if the frame graph has multiple leaf nodes. * The function returns a QRenderCaptureReply object, which receives the captured image * when it is done. The user is responsible for deallocating the returned object. */ @@ -357,6 +366,17 @@ QRenderCaptureReply *QRenderCapture::requestCapture(const QRect &rect) } /*! + * Used to request render capture. Only one render capture result is produced per + * requestCapture call even if the frame graph has multiple leaf nodes. + * The function returns a QRenderCaptureReply object, which receives the captured image + * when it is done. The user is responsible for deallocating the returned object. + */ +Qt3DRender::QRenderCaptureReply *QRenderCapture::requestCapture() +{ + return requestCapture(QRect()); +} + +/*! * \internal */ void QRenderCapture::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) diff --git a/src/render/framegraph/qrendercapture.h b/src/render/framegraph/qrendercapture.h index c18b16170..b3545a8ec 100644 --- a/src/render/framegraph/qrendercapture.h +++ b/src/render/framegraph/qrendercapture.h @@ -84,9 +84,10 @@ class QT3DRENDERSHARED_EXPORT QRenderCapture : public QFrameGraphNode public: explicit QRenderCapture(Qt3DCore::QNode *parent = nullptr); - Q_INVOKABLE Q_DECL_DEPRECATED_X("Use the overload with no parameter") - Qt3DRender::QRenderCaptureReply *requestCapture(int captureId, const QRect &rect = QRect()); - Q_REVISION(9) Q_INVOKABLE Qt3DRender::QRenderCaptureReply *requestCapture(const QRect &rect = QRect()); + Q_INVOKABLE Q_DECL_DEPRECATED_X("Use the overload with no id parameter") + Qt3DRender::QRenderCaptureReply *requestCapture(int captureId); + Q_REVISION(9) Q_INVOKABLE Qt3DRender::QRenderCaptureReply *requestCapture(); + Q_REVISION(10) Q_INVOKABLE Qt3DRender::QRenderCaptureReply *requestCapture(const QRect &rect); protected: void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE; |