Building the Qt 3D Studio OpenGL Runtime

Build Settings

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

Performance Logging

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

During the application startup console output should then contain following:

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

Log format is: (n) [task name] - [time] = [cumulative time] where:

  • (n) = The amount of time [task name] was run during startup.
  • [task name] = Method/task being logged.
  • [time] = How many ms running [task name] for (n) times totally takes.
  • [cumulative time] = How many total ms has passed when the last run of [task name] ends.

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

Note: QT3DS_ENABLE_PERF_LOGGING should not be enabled in release builds as logging increases performance overhead.

Shadows and Lights

To optimize the supported shadows and lights amount, you can define QT3DS_MAX_NUM_LIGHTS and QT3DS_MAX_NUM_SHADOWS.

Legacy ASTC

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

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.

Build Instructions

Available under certain Qt licenses.
Find out more.