C

System and Application Requirements

OpenGL Requirements

Qt 3D Studio requires OpenGL or OpenGL ES. The recommended minimum versions are 3.3 core profile and 3.0, respectively.

When it comes to OpenGL ES, a limited subset of the functionality is available when running on plain OpenGL ES 2.0 implementations. In practice this means losing shadow mapping, image based lighting, and many other advanced features and is therefore not recommended. On the other hand, this allows bringing up Qt 3D Studio scenes on boards like the Raspberry Pi (with the original proprietary graphics stack) or the Beaglebone Black, or in hypervisor-based virtualized environments where the GPU virtualization only supports GLES 2.0, and can therefore still be valuable in certain special situations.

Non-native implementations, like ANGLE or software implementations like Mesa's llvmpipe may work but are not tested and can fail in unexpected ways.

As of version 2.0 the Qt 3D Studio Runtime is implemented on top of Qt 3D. This means that most graphics API and windowing system bits are abstracted and hidden from the runtime. However, there are still direct OpenGL dependencies in a few places and, more importantly, the standard material, custom materials, and effects all rely on GLSL. Therefore other graphics APIs, such as, Vulkan or Direct 3D, cannot be supported at this time.

Application Integration Notes

C++

A typical Qt C++ application using the Qt 3D Studio Runtime is expected to query and honor the runtime's ideal surface format. This way the OpenGL contexts will all be created with the OpenGL version and profile that best match the runtime's needs:

#include <Q3DSWidget> // or <q3dsruntimeglobal.h> if only Q3DS::surfaceFormat() is interesting for main()

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat());

    Q3DSWidget w;
    ...
    return app.exec();
}

To enable using Qt 3D Studio headers and libraries in the application, add the 3dstudioruntime2 module in the application's .pro file:

QT += 3dstudioruntime2

QML/Qt Quick

When no C++ classes are used, the 3dstudioruntime2 module can be omitted in the .pro. To use the Studio3D element in QML code, it is enough to add the corresponding import statement:

import QtStudio3D 2.1

It is nonetheless strongly recommended to set the the default surface format as shown above. Make sure the QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat()) call is made after constructing QGuiApplication but before the first QQuickWindow or QQuickView. When this is not possible, for example because the QML contents is hosted in an application that has no knowledge of the Qt Quick scene's 3D needs, Studio3D may still be usable but this may be dependent on the OpenGL implementation and the context versions it offers, and is therefore more fragile.

Available under certain Qt licenses.
Find out more.