diff options
author | Mike Krus <mike.krus@kdab.com> | 2016-03-16 22:41:28 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-03-20 18:52:47 +0000 |
commit | f837692f5b8579125335624ea7228a4edb5897b5 (patch) | |
tree | 43959de808fe9c13cee9d229b4b3c1254ca47375 /src/render/framegraph/qclearbuffers.cpp | |
parent | ad5fe1d0469edb2a250640a2e13c8cf97b07d870 (diff) |
Rename QClearBuffer to QClearBuffers
Task-number: QTBUG-51460
Change-Id: I3f522f5eaea7bf0f94dbcdc1e7463f2827c0fe3b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/framegraph/qclearbuffers.cpp')
-rw-r--r-- | src/render/framegraph/qclearbuffers.cpp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/src/render/framegraph/qclearbuffers.cpp b/src/render/framegraph/qclearbuffers.cpp new file mode 100644 index 000000000..d0c323086 --- /dev/null +++ b/src/render/framegraph/qclearbuffers.cpp @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2014 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 "qclearbuffers.h" +#include <private/qclearbuffers_p.h> +#include <Qt3DCore/qscenepropertychange.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +QClearBuffersPrivate::QClearBuffersPrivate() + : QFrameGraphNodePrivate() + , m_buffersType(QClearBuffers::None) +{ +} + +void QClearBuffers::copy(const QNode *ref) +{ + QFrameGraphNode::copy(ref); + const QClearBuffers *b = static_cast<const QClearBuffers*>(ref); + d_func()->m_buffersType = b->d_func()->m_buffersType; +} + +QClearBuffers::QClearBuffers(QNode *parent) + : QFrameGraphNode(*new QClearBuffersPrivate, parent) +{ +} + +QClearBuffers::~QClearBuffers() +{ + QNode::cleanup(); +} + +/*! \internal */ +QClearBuffers::QClearBuffers(QClearBuffersPrivate &dd, QNode *parent) + : QFrameGraphNode(dd, parent) +{ +} + + +QClearBuffers::BufferType QClearBuffers::buffers() const +{ + Q_D(const QClearBuffers); + return d->m_buffersType; +} + +void QClearBuffers::setBuffers(QClearBuffers::BufferType buffers) +{ + Q_D(QClearBuffers); + if (d->m_buffersType != buffers) { + d->m_buffersType = buffers; + emit buffersChanged(buffers); + } +} + +} // namespace Qt3DRender + +QT_END_NAMESPACE |