| 1 | // Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #include "qdebugoverlay.h" |
| 5 | #include "qdebugoverlay_p.h" |
| 6 | |
| 7 | QT_BEGIN_NAMESPACE |
| 8 | |
| 9 | namespace Qt3DRender { |
| 10 | |
| 11 | /*! |
| 12 | \class Qt3DRender::QDebugOverlay |
| 13 | \inmodule Qt3DRender |
| 14 | \ingroup framegraph |
| 15 | \brief Enables a visual overlay with scene details. |
| 16 | |
| 17 | Placing a QDebugOverlay in one branch of a custom framegraph will cause an overlay |
| 18 | with scene details to be rendered along with the scene. |
| 19 | |
| 20 | The standard QForwardRenderer includes a QDebugOverlay node that can be enabled via |
| 21 | the QForwardRenderer::showDebugOverlay property. |
| 22 | |
| 23 | */ |
| 24 | |
| 25 | /*! |
| 26 | \qmltype DebugOverlay |
| 27 | \inqmlmodule Qt3D.Render |
| 28 | \nativetype Qt3DRender::QDebugOverlay |
| 29 | \inherits FrameGraphNode |
| 30 | \since 2.16 |
| 31 | \brief Enables a visual overlay with scene details. |
| 32 | |
| 33 | Placing a DebugOverlay in one branch of a custom framegraph will cause an overlay |
| 34 | with scene details to be rendered along with the scene. |
| 35 | |
| 36 | The standard ForwardRenderer includes a DebugOverlay node that can be enabled via |
| 37 | the ForwardRenderer::showDebugOverlay property. |
| 38 | */ |
| 39 | |
| 40 | /*! |
| 41 | * \internal |
| 42 | */ |
| 43 | QDebugOverlayPrivate::QDebugOverlayPrivate() |
| 44 | : QFrameGraphNodePrivate() |
| 45 | { |
| 46 | } |
| 47 | |
| 48 | /*! |
| 49 | * \internal |
| 50 | */ |
| 51 | QDebugOverlayPrivate::~QDebugOverlayPrivate() = default; |
| 52 | |
| 53 | /*! |
| 54 | * The constructor creates an instance with the specified \a parent. |
| 55 | */ |
| 56 | QDebugOverlay::QDebugOverlay(Qt3DCore::QNode *parent) |
| 57 | : QFrameGraphNode(*new QDebugOverlayPrivate, parent) |
| 58 | { |
| 59 | } |
| 60 | |
| 61 | } // Qt3DRender |
| 62 | |
| 63 | QT_END_NAMESPACE |
| 64 | |
| 65 | #include "moc_qdebugoverlay.cpp" |
| 66 | |