summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-08-04 16:11:15 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-08-07 11:30:52 +0000
commit2cb3b7fbb31777c31d6e733ed4b980add028abe2 (patch)
treee11ef5dec8dcfc94b9f1c2d94a442fff7e14113b
parentef1ac9f40a42093a541f18f129b39679b0fd2c78 (diff)
QBufferFunctor: provides a way to load buffer data in jobs
Change-Id: If3cb6c55ea80191c87470d8bed7a5a0c7b16d214 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/render/io/qbufferfunctor.h65
-rw-r--r--src/render/io/render-io.pri3
2 files changed, 67 insertions, 1 deletions
diff --git a/src/render/io/qbufferfunctor.h b/src/render/io/qbufferfunctor.h
new file mode 100644
index 000000000..550905042
--- /dev/null
+++ b/src/render/io/qbufferfunctor.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 QT3D_QBUFFERFUNCTOR
+#define QT3D_QBUFFERFUNCTOR
+
+#include <Qt3DRenderer/qt3drenderer_global.h>
+#include <Qt3DCore/qabstractfunctor.h>
+#include <QSharedPointer>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+class QT3DRENDERERSHARED_EXPORT QBufferFunctor : public QAbstractFunctor
+{
+public:
+ virtual ~QBufferFunctor() {}
+ virtual QByteArray operator()() = 0;
+ virtual bool operator ==(const QBufferFunctor &other) const = 0;
+};
+
+typedef QSharedPointer<QBufferFunctor> QBufferFunctorPtr;
+
+} // Qt3D
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(Qt3D::QBufferFunctorPtr)
+
+#endif // QT3D_QBUFFERFUNCTOR
+
diff --git a/src/render/io/render-io.pri b/src/render/io/render-io.pri
index 6415585c3..6d64cf9a6 100644
--- a/src/render/io/render-io.pri
+++ b/src/render/io/render-io.pri
@@ -11,7 +11,8 @@ HEADERS += \
$$PWD/qbuffer_p.h \
$$PWD/qmeshdata_p.h \
$$PWD/qmeshdata.h \
- $$PWD/uniformbuffer_p.h
+ $$PWD/uniformbuffer_p.h \
+ $$PWD/qbufferfunctor.h
SOURCES += \
$$PWD/gltfparser.cpp \