summaryrefslogtreecommitdiffstats
path: root/src/render/backend/renderqueue_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire350@gmail.com>2015-06-25 22:59:34 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-06-29 15:25:14 +0000
commit136acab69f9bbf9872ed5a984378cb9f9d072fcd (patch)
tree2502cd1a0f729389d2d4731b423a7e8b2569258a /src/render/backend/renderqueue_p.h
parentc1b0858fea08be8c14860fcf5c3b50fb1d4a6f4b (diff)
Renderer refactored to only process jobs for the current frame
- get rid of the RenderQueues - properly synchronize the RenderQueue/Allocators - unit tests updated Change-Id: I71c0321c888765c674cbe5fda5ececfa11b06995 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/backend/renderqueue_p.h')
-rw-r--r--src/render/backend/renderqueue_p.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/render/backend/renderqueue_p.h b/src/render/backend/renderqueue_p.h
new file mode 100644
index 000000000..8368977f4
--- /dev/null
+++ b/src/render/backend/renderqueue_p.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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_RENDER_RENDERQUEUE_H
+#define QT3D_RENDER_RENDERQUEUE_H
+
+#include <QVector>
+#include <QtGlobal>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+namespace Render {
+
+class RenderView;
+
+class Q_AUTOTEST_EXPORT RenderQueue
+{
+public:
+ RenderQueue();
+
+ void setTargetRenderViewCount(int targetRenderViewCount);
+ int targetRenderViewCount() const { return m_targetRenderViewCount; }
+ int currentRenderViewCount() const;
+ bool isFrameQueueComplete() const;
+
+ bool queueRenderView(RenderView *renderView, uint submissionOrderIndex);
+ QVector<RenderView *> nextFrameQueue();
+ void reset();
+
+private:
+ int m_targetRenderViewCount;
+ int m_currentRenderViewCount;
+ QVector<RenderView *> m_currentWorkQueue;
+};
+
+} // Render
+
+} // Qt3D
+
+QT_END_NAMESPACE
+
+#endif // QT3D_RENDER_RENDERQUEUE_H