summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-08-06 15:02:07 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-08-07 16:50:59 +0000
commitff868c5430891d166dc2098641f9d1e48246fced (patch)
tree0d578a39b37e1144b579dfd56ada6f35e7d58821
parentecaa9ab2d6172ea97eca096c6b4c0b0f11ba73b1 (diff)
QGeometryFunctor: will allow to load whole geometries as jobs
Change-Id: I516c7b908147af05e34e6aa417a1028505e00ee9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/render/io/qgeometryfunctor.h67
-rw-r--r--src/render/io/render-io.pri3
2 files changed, 69 insertions, 1 deletions
diff --git a/src/render/io/qgeometryfunctor.h b/src/render/io/qgeometryfunctor.h
new file mode 100644
index 000000000..e64a6ef80
--- /dev/null
+++ b/src/render/io/qgeometryfunctor.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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_QGEOMETRYFUNCTOR
+#define QT3D_QGEOMETRYFUNCTOR
+
+#include <Qt3DRenderer/qt3drenderer_global.h>
+#include <Qt3DCore/qabstractfunctor.h>
+#include <QSharedPointer>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+class QGeometry;
+
+class QT3DRENDERERSHARED_EXPORT QGeometryFunctor : public QAbstractFunctor
+{
+public:
+ virtual ~QGeometryFunctor() {}
+ virtual QGeometry *operator()() = 0;
+ virtual bool operator ==(const QGeometryFunctor &other) const = 0;
+};
+
+typedef QSharedPointer<QGeometryFunctor> QGeometryFunctorPtr;
+
+} // Qt3D
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(Qt3D::QGeometryFunctorPtr)
+
+#endif // QT3D_QGEOMETRYFUNCTOR
+
diff --git a/src/render/io/render-io.pri b/src/render/io/render-io.pri
index 6d64cf9a6..c96e4617e 100644
--- a/src/render/io/render-io.pri
+++ b/src/render/io/render-io.pri
@@ -12,7 +12,8 @@ HEADERS += \
$$PWD/qmeshdata_p.h \
$$PWD/qmeshdata.h \
$$PWD/uniformbuffer_p.h \
- $$PWD/qbufferfunctor.h
+ $$PWD/qbufferfunctor.h \
+ $$PWD/qgeometryfunctor.h
SOURCES += \
$$PWD/gltfparser.cpp \