aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2012-11-28 08:34:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-28 08:53:03 +0100
commitaf25de87d610b65b729466d695d2cb66ded4eac4 (patch)
treeaa85eedc8cd918893b0a8aec88d343c145544e64 /src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
parentc28dc8a43224d14a23ce749725535042c514ccf3 (diff)
docfix: Some of the scenegraph overview content did not make sense.
Change-Id: Ib354e5f0a9f3c6e35eb8dabfb36e931f9ba4f255 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc')
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
index fa38166ef0..ca8a045975 100644
--- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
@@ -29,16 +29,6 @@
\title Qt Quick Scene Graph
\page qtquick-visualcanvas-scenegraph.html
-\section1 What is a Scene Graph?
-
-When drawing visual objects of a user-interface, it can be beneficial to group
-drawing operations which are similar. For example, if a user-interface
-includes many similar text boxes, each with a light-blue background, then all
-of those text boxes could be painted at the same time, prior to painting any
-of the text in each box, as this might be more performant than painting one of
-the text boxes, and then painting its text, and then painting the next text
-box, and then its text, and so on.
-
\section1 The Scene Graph in Qt Quick
Qt Quick 2 makes use of a dedicated scene graph based on OpenGL ES 2.0
@@ -47,7 +37,17 @@ rather than the traditional imperative painting systems (QPainter and
similar), means the scene to be rendered can be retained between
frames and the complete set of primitives to render is known before
rendering starts. This opens up for a number of optimizations, such as
-batch rendering to minimize state changes and discarding obscured primitives.
+batch rendering to minimize state changes and discarding obscured
+primitives.
+
+For example, say a user-interface contains a list of ten items
+where each item has a background color, an icon and a text. Using the
+traditional drawing techniques, this would result in 30 draw calls and
+a similar amount of state changes. A scene graph, on the other hand,
+could reorganize the primitives to render such that all backgrounds
+are drawn in one call, then all icons, then all the text, reducing the
+total amount of draw calls to only 3. Batching and state change
+reduction like this can greatly improve performance on some hardware.
The scene graph is closely tied to QML and can not be used as
stand-alone. The scene graph is managed and rendered by the