summaryrefslogtreecommitdiffstats
path: root/src/runtime/doc/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-05-23 17:54:26 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-05-23 17:54:33 +0200
commit41ccb47065b9ba4418d792644415a424270b256f (patch)
tree7a1ae164efc44b4cd74344fb88d13fe1158576c4 /src/runtime/doc/src
parent8bb3378d0d7c82eb1896ac043570ddab7c2edae9 (diff)
parentb81bba4795eea06d4dcbf39c99f986de2654077d (diff)
Merge remote-tracking branch 'origin/2.0'v2.0.0-beta2
Diffstat (limited to 'src/runtime/doc/src')
-rw-r--r--src/runtime/doc/src/copyright.qdoc2
-rw-r--r--src/runtime/doc/src/images/customsignal.pngbin0 -> 28206 bytes
-rw-r--r--src/runtime/doc/src/images/profileui-example.pngbin0 -> 427508 bytes
-rw-r--r--src/runtime/doc/src/images/profileui-tooltips.pngbin0 -> 261025 bytes
-rw-r--r--src/runtime/doc/src/index.qdoc5
-rw-r--r--src/runtime/doc/src/module.qdoc56
-rw-r--r--src/runtime/doc/src/profileui.qdoc133
7 files changed, 188 insertions, 8 deletions
diff --git a/src/runtime/doc/src/copyright.qdoc b/src/runtime/doc/src/copyright.qdoc
index 01275f1..f0574a5 100644
--- a/src/runtime/doc/src/copyright.qdoc
+++ b/src/runtime/doc/src/copyright.qdoc
@@ -33,5 +33,5 @@
The following table lists parts (modules) of Qt 3D Studio Runtime that
incorporate code licensed under third-party open-source licenses:
-\annotatedlist attributions-Qt3DStudioRuntime2
+\annotatedlist attributions-qt3dstudioruntime2
*/
diff --git a/src/runtime/doc/src/images/customsignal.png b/src/runtime/doc/src/images/customsignal.png
new file mode 100644
index 0000000..eb0e0ba
--- /dev/null
+++ b/src/runtime/doc/src/images/customsignal.png
Binary files differ
diff --git a/src/runtime/doc/src/images/profileui-example.png b/src/runtime/doc/src/images/profileui-example.png
new file mode 100644
index 0000000..27c38bd
--- /dev/null
+++ b/src/runtime/doc/src/images/profileui-example.png
Binary files differ
diff --git a/src/runtime/doc/src/images/profileui-tooltips.png b/src/runtime/doc/src/images/profileui-tooltips.png
new file mode 100644
index 0000000..1828ad6
--- /dev/null
+++ b/src/runtime/doc/src/images/profileui-tooltips.png
Binary files differ
diff --git a/src/runtime/doc/src/index.qdoc b/src/runtime/doc/src/index.qdoc
index 43d8b18..387e86f 100644
--- a/src/runtime/doc/src/index.qdoc
+++ b/src/runtime/doc/src/index.qdoc
@@ -34,11 +34,10 @@
\list
\li \l {Getting Started}
\li \l {System and Application Requirements}
- \li \l {Using the Runtime on Android/iOS Devices}
- \li \l {Using the Runtime on Embedded Devices}
\li \l {Qt 3D Studio Runtime C++ Classes}
\li \l {Qt 3D Studio Runtime QML Types}
- \li \l {Attribute Names}{Scene object attribute list}
+ \li \l {Attribute Names}{Scene Object Attribute List}
+ \li \l {Using the In-Scene Debug and Profile views}
\li \l {Examples}
\li \l {Copyright Notices}
\endlist
diff --git a/src/runtime/doc/src/module.qdoc b/src/runtime/doc/src/module.qdoc
index d37417f..ba6068f 100644
--- a/src/runtime/doc/src/module.qdoc
+++ b/src/runtime/doc/src/module.qdoc
@@ -31,7 +31,8 @@
\keyword C++ API
\ingroup modules
- \brief Qt 3D Studio provides a number of C++ classes to view and control the presentation.
+ \brief The Qt 3D Studio Runtime provides a number of C++ classes to
+ integrate and control Qt 3D Studio presentations in Qt applications.
To include the definitions of the module's classes, use the following directive:
@@ -45,6 +46,36 @@
QT += 3dstudioruntime2
\endcode
+ \section1 Integrating
+
+ The two main classes are \l Q3DSWidget and \l Q3DSSurfaceViewer. Q3DSWidget
+ is a QWidget that can be used to show presentations inside a widget-based
+ user interface. Q3DSSurfaceViewer allows targeting a QWindow or an
+ offscreen render target (an OpenGL texture).
+
+ \note Qt applications based on QML and Qt Quick will rather want to use the
+ \l Studio3D type from \l{Qt 3D Studio Runtime QML Types}.
+
+ \section1 Controlling
+
+ Each \l Q3DSWidget and \l Q3DSSurfaceViewer instance exposes a \l
+ Q3DSPresentation. This, possibly in combination with \l Q3DSDataInput or
+ \l Q3DSElement objects, allows
+
+ \list
+
+ \li changing scene object properties (for example, the transform of a
+ model, colors and other settings of a material, etc.),
+
+ \li changing slides (thus starting the relevant animations and applying the
+ scene object property changes associated with the new slide),
+
+ \li and controlling the timeline (the current playback position for the
+ key-frame based animations) both on the main scene and on individual
+ Component nodes.
+
+ \endlist
+
\section1 Classes
\generatelist {classesbymodule 3dstudioruntime2}
@@ -59,14 +90,31 @@
\brief QML Types for the Qt 3D Studio Runtime module.
- Qt 3D Studio provides a number of QML types to view and control the
- presentation. These types can be imported into your application using the
- following import statement in your .qml file:
+ The Qt 3D Studio Runtime provides a number of QML types to integrate and
+ control Qt 3D Studio presentations in Qt Quick applications. These types
+ can be imported into your application using the following import statement
+ in your \c{.qml} file:
\badcode
import QtStudio3D 2.0
\endcode
+ The main type for embedding a Qt 3D Studio presentations into a Qt Quick
+ scene is \l Studio3D. Many of the other types correspond to a C++ class in
+ the API offered to non-QML based applications, providing the same level of
+ control described in \l{Qt 3D Studio Runtime C++ Classes}{the C++
+ reference}.
+
+ There are also QML types that offer functionality not available via the C++
+ classes. The \l SubPresentationSettings type allows defining \c{QML
+ sub-presentations} (live Qt Quick scenes composed into the 3D scene either
+ as Qt 3D Studio layers or as texture maps) in-line, inside a Studio3D
+ element, without having to deploy them as separate \c .qml files.
+
+ \note the \l Behavior type is to be used by \c{behavior scripts} (\c .qml
+ snippets associated with scene objects during the design phase in Qt 3D
+ Studio) and is not available in the main application code.
+
\section1 QML Types
\generatelist {qmltypesbymodule QtStudio3D}
diff --git a/src/runtime/doc/src/profileui.qdoc b/src/runtime/doc/src/profileui.qdoc
new file mode 100644
index 0000000..91df0a2
--- /dev/null
+++ b/src/runtime/doc/src/profileui.qdoc
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt3d-runtime-profileui.html
+ \title Using the In-Scene Debug and Profile views
+
+ The Qt 3D Studio Runtime includes a set of built-in views that can be
+ brought up on top of the scene at any time. These panes are rendered
+ completely inside the 3D scene and are therefore available on any platform,
+ even when running on mobile or embedded systems without a windowing system
+ (for example, via the \c eglfs platform plugin), with the Qt 3D Studio
+ presentation and the Qt Quick user interface occupying the entire scren.
+
+ \image profileui-example.png
+
+ \section1 Activation
+
+ In the Viewer application, toggle with \c F10 or the \uicontrol{Profile and
+ Debug} submenu under \uicontrol View.
+
+ In applications these views have no built-in shortcuts. It is up to the
+ application to toggle visibility. From C++ this is done via \l
+ Q3DSPresentation::profileUiVisible or \l
+ Q3DSViewerSettings::showRenderStats. From QML the corresponding properties
+ are \l Presentation::profileUiVisible and \l ViewerSettings::showRenderStats.
+
+ In order to enable all features in the debug and profile views, presentations
+ must be loaded with profiling enabled. In this mode the Qt 3D objects
+ managed by the runtime get tracked, and various statistics get collected
+ internally. This is enabled by default in the Viewer application, whereas
+ applications have to opt-in explicitly via \l
+ Q3DSPresentation::profilingEnabled or \l Presentation::profilingEnabled.
+
+ As an example, the following is how the \l{Qt 3D Studio Runtime: Simple QML
+ Example} enables and connects the toggling of these views to a Qt Quick
+ Controls button:
+
+ \badcode
+ Studio3D {
+ Presentation {
+ id: presentation
+ source: "qrc:/presentation/barrel.uip"
+ profilingEnabled: true
+ }
+ }
+
+ Button {
+ text: "Toggle profile UI"
+ onClicked: presentation.profileUiVisible = !s3dpres.profileUiVisible
+ ...
+ }
+ }
+ \endcode
+
+ \section1 Features
+
+ \list
+
+ \li CPU and memory usage of the application process (available on Windows, Linux, and Android)
+
+ \li OpenGL context information
+
+ \li Frame rate, with a visualization of its history during the last 100 frames (configurable)
+
+ \li Various timings from the loading of the scene
+
+ \li Qt 3D object list - showing the active list of mesh and texture objects
+ can give an approximate understanding of the graphics resource usage and
+ can also uncover sub-optimal asset situations that lead to degraded
+ performance. For example, having a large number of meshes in the list for a
+ seemingly simple scene should warrant an investigation of the assets as
+ they may be overly complex. Similarly, large textures are often not ideal,
+ yet they may be overlooked during the design phase of the presentation.
+ Here it becomes immediately obvious if some texture map is unncessarily
+ large.
+
+ \li Layer list - showing the list of active and inactive \c layers in the
+ presentation. A Qt 3D Studio presentations consists of one or more layers
+ which are backed by OpenGL textures each. These are composed together with
+ the appropriate blending mode (and optionally with post-postprocessing
+ effects applied) to get the final output. It is important to understand
+ that each layer corresponds to a separate render target (e.g. an OpenGL
+ texture and the corresponding framebuffer setup) in the engine and is using
+ graphics resources like any other texture map. The performance of the
+ composition is also important, especially on mobile and embedded where the
+ fragment processing power can be more limited.
+
+ \li A filterable log view (with the debug messages that are also printed on
+ the default qDebug output of the platform)
+
+ \li A number of other, experimental views
+
+ \endlist
+
+ The views and their contents are live at any time, meaning they always
+ reflect the Qt 3D Studio Runtime's state for the current frame.
+
+ Watch out for the tooltips marked with \c{(?)}. Moving the mouse cursor
+ over these results in showing additional information about the item in
+ question which can be useful in understanding the implications of certain
+ statistics.
+
+ \image profileui-tooltips.png
+
+ \note the feature set may get extended or changed in future versions. It is
+ also possible that certain information gets folded into the Qt 3D Studio
+ application itself in the future.
+*/