aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgnode.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-08-14 07:27:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 14:24:36 +0200
commitb480fa83a632b2ae5606e2870b47358328b479a2 (patch)
treebdd3e1b68a5a15a3950e13a50db911a93cdf279a /src/quick/scenegraph/coreapi/qsgnode.h
parent9be35c270082d1614886874e17cc3f90a7a3f489 (diff)
New scenegraph renderer and atlas textures.
The renderer tries to batch primitives together where possible, isolate non-changing subparts of the scene from changing subparts and retain vertexdata on the GPU as much as possible. Atlas textures are crucial in enabling batching. The renderer and atlas texture are described in detail in the doc page "Qt Quick Scene Graph Renderer". Change-Id: Ia476c7f0f42e1fc57a2cef528e93ee88cf8f7055 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgnode.h')
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index 26af56f3d0..3475206945 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtQml module of the Qt Toolkit.
+** This file is part of the QtQuick module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -62,6 +62,11 @@ class QSGNodePrivate;
class QSGBasicGeometryNodePrivate;
class QSGGeometryNodePrivate;
+namespace QSGBatchRenderer {
+ class Renderer;
+ class Updater;
+}
+
class Q_QUICK_EXPORT QSGNode
{
public:
@@ -82,16 +87,19 @@ public:
OwnedByParent = 0x0001,
UsePreprocess = 0x0002,
- // Upper 16 bits reserved for node subclasses
+ // 0x00ff0000 bits reserved for node subclasses
// QSGBasicGeometryNode
OwnsGeometry = 0x00010000,
OwnsMaterial = 0x00020000,
OwnsOpaqueMaterial = 0x00040000
+
+ // Uppermost 8 bits are reserved for internal use.
};
Q_DECLARE_FLAGS(Flags, Flag)
enum DirtyStateBit {
+ DirtySubtreeBlocked = 0x0080,
DirtyMatrix = 0x0100,
DirtyNodeAdded = 0x0400,
DirtyNodeRemoved = 0x0800,
@@ -152,6 +160,7 @@ protected:
private:
friend class QSGRootNode;
+ friend class QSGBatchRenderer::Renderer;
void init();
void destroy();
@@ -165,7 +174,7 @@ private:
int m_subtreeRenderableCount;
Flags m_nodeFlags;
- DirtyState m_dirtyState;
+ DirtyState m_dirtyState; // Obsolete, remove in Qt 6
protected:
friend class QSGNodePrivate;
@@ -195,6 +204,8 @@ protected:
private:
friend class QSGNodeUpdater;
+ friend class QSGBatchRenderer::Updater;
+
QSGGeometry *m_geometry;
int m_reserved_start_index;