summaryrefslogtreecommitdiffstats
path: root/src/render/backend/jobs/framepreparationjob_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-01-21 15:23:39 +0100
committerPaul Lemire <paul.lemire@kdab.com>2015-01-24 14:30:24 +0100
commiteeab3dabf1b374867377128330c302228759bb5f (patch)
treefd7620fd743a0a57bf7f2f8dff9a9c756c65f100 /src/render/backend/jobs/framepreparationjob_p.h
parent7bc827504190858bccdff82f63211f4988bc48df (diff)
RenderShaderData: ModelToEye/ModelToWorld property transform
* Reuse jobs in QRenderAspect * Added FramePreparationJob which: - updates RenderShaderData with node world matrix - create bounding volume for nodes * RenderShaderData slightly modified to accommodate the transformed properties - needsUpdate now takes the viewMatrix - fix a bug where for a nested array, order wasn't maintained if not all the elements had been updated Change-Id: I0d91dc1d52c4333be74cce56c334aea70498138e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/backend/jobs/framepreparationjob_p.h')
-rw-r--r--src/render/backend/jobs/framepreparationjob_p.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/render/backend/jobs/framepreparationjob_p.h b/src/render/backend/jobs/framepreparationjob_p.h
new file mode 100644
index 000000000..63513b82e
--- /dev/null
+++ b/src/render/backend/jobs/framepreparationjob_p.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** 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: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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 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 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3D_RENDER_FRAMEPREPARATIONJOB_H
+#define QT3D_RENDER_FRAMEPREPARATIONJOB_H
+
+#include <Qt3DCore/qaspectjob.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+namespace Render {
+
+class Renderer;
+class RenderEntity;
+
+class FramePreparationJob : public Qt3D::QAspectJob
+{
+public:
+ FramePreparationJob(Renderer *renderer, RenderEntity *root);
+ ~FramePreparationJob();
+
+protected:
+ void run() Q_DECL_FINAL;
+
+private:
+
+ void parseNodeTree(RenderEntity *node);
+
+ Renderer *m_renderer;
+ RenderEntity *m_root;
+};
+
+typedef QSharedPointer<FramePreparationJob> FramePreparationJobPtr;
+
+} // Render
+
+} // Qt3D
+
+QT_END_NAMESPACE
+
+#endif // QT3D_RENDER_FRAMEPREPARATIONJOB_H