diff options
Diffstat (limited to 'src/render/framegraph')
-rw-r--r-- | src/render/framegraph/debugoverlay.cpp | 60 | ||||
-rw-r--r-- | src/render/framegraph/debugoverlay_p.h | 75 | ||||
-rw-r--r-- | src/render/framegraph/framegraph.pri | 9 | ||||
-rw-r--r-- | src/render/framegraph/framegraphnode_p.h | 3 | ||||
-rw-r--r-- | src/render/framegraph/qdebugoverlay.cpp | 67 | ||||
-rw-r--r-- | src/render/framegraph/qdebugoverlay.h | 63 | ||||
-rw-r--r-- | src/render/framegraph/qdebugoverlay_p.h | 73 |
7 files changed, 347 insertions, 3 deletions
diff --git a/src/render/framegraph/debugoverlay.cpp b/src/render/framegraph/debugoverlay.cpp new file mode 100644 index 000000000..2d2a1e63b --- /dev/null +++ b/src/render/framegraph/debugoverlay.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include <Qt3DRender/private/qdebugoverlay_p.h> +#include <Qt3DRender/private/debugoverlay_p.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +namespace Render { + +DebugOverlay::DebugOverlay() + : FrameGraphNode(FrameGraphNode::DebugOverlay, QBackendNode::ReadWrite) +{ + +} + +} //Render + +} //Qt3DRender + +QT_END_NAMESPACE diff --git a/src/render/framegraph/debugoverlay_p.h b/src/render/framegraph/debugoverlay_p.h new file mode 100644 index 000000000..a2045ffbe --- /dev/null +++ b/src/render/framegraph/debugoverlay_p.h @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DEBUGOVERLAY_P_H +#define DEBUGOVERLAY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <Qt3DRender/private/qdebugoverlay_p.h> +#include <Qt3DRender/private/framegraphnode_p.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +namespace Render { + +class Q_AUTOTEST_EXPORT DebugOverlay : public FrameGraphNode +{ +public: + DebugOverlay(); +}; + +} //Render + +} //Qt3DRender + +QT_END_NAMESPACE + +#endif // DEBUGOVERLAY_P_H diff --git a/src/render/framegraph/framegraph.pri b/src/render/framegraph/framegraph.pri index bb833422f..a622bd281 100644 --- a/src/render/framegraph/framegraph.pri +++ b/src/render/framegraph/framegraph.pri @@ -69,7 +69,10 @@ HEADERS += \ $$PWD/nopicking_p.h \ $$PWD/qsubtreeenabler.h \ $$PWD/qsubtreeenabler_p.h \ - $$PWD/subtreeenabler_p.h + $$PWD/subtreeenabler_p.h \ + $$PWD/qdebugoverlay.h \ + $$PWD/qdebugoverlay_p.h \ + $$PWD/debugoverlay_p.h SOURCES += \ $$PWD/cameraselectornode.cpp \ @@ -119,4 +122,6 @@ SOURCES += \ $$PWD/qnopicking.cpp \ $$PWD/nopicking.cpp \ $$PWD/qsubtreeenabler.cpp \ - $$PWD/subtreeenabler.cpp + $$PWD/subtreeenabler.cpp \ + $$PWD/qdebugoverlay.cpp \ + $$PWD/debugoverlay.cpp diff --git a/src/render/framegraph/framegraphnode_p.h b/src/render/framegraph/framegraphnode_p.h index 846dc8060..55bede5fd 100644 --- a/src/render/framegraph/framegraphnode_p.h +++ b/src/render/framegraph/framegraphnode_p.h @@ -104,7 +104,8 @@ public: BlitFramebuffer, SetFence, WaitFence, - NoPicking + NoPicking, + DebugOverlay, }; FrameGraphNodeType nodeType() const { return m_nodeType; } diff --git a/src/render/framegraph/qdebugoverlay.cpp b/src/render/framegraph/qdebugoverlay.cpp new file mode 100644 index 000000000..d82ae88ba --- /dev/null +++ b/src/render/framegraph/qdebugoverlay.cpp @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdebugoverlay.h" +#include "qdebugoverlay_p.h" + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +/*! + * \internal + */ +QDebugOverlayPrivate::QDebugOverlayPrivate() + : QFrameGraphNodePrivate() +{ +} + +/*! + * \internal + */ +QDebugOverlayPrivate::~QDebugOverlayPrivate() = default; + +/*! + * The constructor creates an instance with the specified \a parent. + */ +QDebugOverlay::QDebugOverlay(Qt3DCore::QNode *parent) + : QFrameGraphNode(*new QDebugOverlayPrivate, parent) +{ +} + +} // Qt3DRender + +QT_END_NAMESPACE diff --git a/src/render/framegraph/qdebugoverlay.h b/src/render/framegraph/qdebugoverlay.h new file mode 100644 index 000000000..1d115fc2e --- /dev/null +++ b/src/render/framegraph/qdebugoverlay.h @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDEBUGOVERLOAY_H +#define QDEBUGOVERLOAY_H + +#include <Qt3DRender/QFrameGraphNode> +#include <QtGui/QImage> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +class QDebugOverlayPrivate; + +class Q_3DRENDERSHARED_EXPORT QDebugOverlay : public QFrameGraphNode +{ + Q_OBJECT +public: + explicit QDebugOverlay(Qt3DCore::QNode *parent = nullptr); + +private: + Q_DECLARE_PRIVATE(QDebugOverlay) +}; + +} // Qt3DRender + +QT_END_NAMESPACE + +#endif // QDEBUGOVERLOAY_H diff --git a/src/render/framegraph/qdebugoverlay_p.h b/src/render/framegraph/qdebugoverlay_p.h new file mode 100644 index 000000000..f8c34655a --- /dev/null +++ b/src/render/framegraph/qdebugoverlay_p.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDEBUGOVERLAY_P_H +#define QDEBUGOVERLAY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <Qt3DRender/qdebugoverlay.h> +#include <Qt3DRender/private/qframegraphnode_p.h> + +#include <QtCore/qmutex.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +class QDebugOverlayPrivate : public QFrameGraphNodePrivate +{ +public: + QDebugOverlayPrivate(); + ~QDebugOverlayPrivate(); + + Q_DECLARE_PUBLIC(QDebugOverlay) +}; + +} // Qt3DRender + +QT_END_NAMESPACE + +#endif // QDEBUGOVERLAY_P_H |