summaryrefslogtreecommitdiffstats
path: root/src/api/studio3d/doc/src/building-opengl-runtime.qdoc
blob: 30822bb824c1c1dbccdb79198cf41ca77da37b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/****************************************************************************
**
** Copyright (C) 2019 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$
**
****************************************************************************/

/*!

\title Building the \RUNTIME
\page building-opengl-runtime.html

\section1 Build Settings

To configure runtime features you can modify \c ogl-runtime\commonplatform.pri file.
This file contains defines which turn on / off specific features.

\section2 Performance Logging
Enable \c QT3DS_ENABLE_PERF_LOGGING to build runtime with performance logging on. At runtime, to see the logs
you should also enable \c qt3ds.perf_info category e.g. with \c "QT_LOGGING_RULES=qt3ds.perf_info=true".
More information about Qt logging categories from \l {https://doc.qt.io/qt-5/qloggingcategory.html}

During the application startup console output should then contain following:

\badcode
qt3ds.perf_info: 1. (1) Application: Begin Load - 1.145900ms = 1.146200ms
qt3ds.perf_info: 2. (1) Context: CreateRenderContext - 192.358500ms = 193.522300ms
qt3ds.perf_info: 3. (1) Binding: Initial Batch Image Load - 0.003200ms = 193.551800ms
qt3ds.perf_info: 4. (1) Binding: Initialize Scenes - 0.000100ms = 193.563500ms
qt3ds.perf_info: 5. (1) SceneManager: OnGraphicsInitialized - 0.023800ms = 193.567600ms
qt3ds.perf_info: 6. (1) Application: EndLoad - 0.000500ms = 193.574900ms
qt3ds.perf_info: 7. (1) Application: GetMetaData - 59.171400ms = 252.875800ms
qt3ds.perf_info: 8. (3) BatchLoader: Image Decompression - 15.395400ms = 294.876900ms
...
qt3ds.perf_info: 36. (1) Application: NotifyDataOutputs - 0.080800ms = 477.483800ms
qt3ds.perf_info: *** First frame rendered ***
qt3ds.perf_info: Runtime startup time: 477ms
qt3ds.perf_info: Application startup time: 1601ms
qt3ds.perf_info: Render Statistics: 33.62fps, frame count 34
qt3ds.perf_info: Render Statistics: 59.92fps, frame count 60
qt3ds.perf_info: Render Statistics: 59.92fps, frame count 60
...
\endcode

Log format is: \c {(n) [task name] - [time] = [cumulative time]} where:
\list
  \li \c (n) = The amount of time \c [task name] was run during startup.
  \li \c [task name] = Method/task being logged.
  \li \c [time] = How many ms running \c [task name] for \c (n) times totally takes.
  \li \c [cumulative time] = How many total ms has passed when the last run of \c [task name] ends.
\endlist

\note When analyzing the results, please note that tasks overlap with each other, some tasks include other tasks etc.
\c {Runtime startup time} contains the time spent inside runtime methods where \c {Application startup time} contains the whole startup time.

\note \c QT3DS_ENABLE_PERF_LOGGING should not be enabled in release builds as logging increases performance overhead.

\section2 Shadows and Lights
To optimize the supported shadows and lights amount, you can define QT3DS_MAX_NUM_LIGHTS and QT3DS_MAX_NUM_SHADOWS.

\section2 Legacy ASTC
To enable legacy ASTC which means that ASTC files are not loaded until needed for texture creation, define LEGACY_ASTC_LOADING.

\section2 Premultiplied ASTC
To force all ASTC compressed images to be treated as premultiplied, you can enable this. Alternatively if you want
to do this at runtime, set QT3DS_ALL_ASTC_PREMULTIPLIED as an environment variable.

\section1 Build Instructions

\list
  \li
    \l {Building \RUNTIME for Embedded Linux}
  \li
    \l {Building \RUNTIME for GHS Integrity}
  \li
    \l {Building \RUNTIME for QNX}
\endlist

*/