Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.9.0, 5.9.1, 5.9
-
None
-
Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.1.0 (clang-802.0.42) (Apple)) on "cocoa"
OS: macOS Sierra (10.12) [darwin version 16.5.0]
Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE
Screens: 1, High DPI scaling: inactive
# 0 "iMac" Depth: 24 Primary: yes
Manufacturer:
Model:
Serial number:
Geometry: 2560x1440+0+0 Available: 2560x1343+0+23
Physical size: 596.55x335.56 mm Refresh: 60 Hz Power state: 0
Physical DPI: 109,109 Logical DPI: 72,72 Subpixel_RGB
DevicePixelRatio: 1 Pixel density: 1
Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
LibGL Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GTX 780M OpenGL Engine
Version: 2.1 NVIDIA-10.16.34 355.10.05.35f05
Shading language: 1.20
Format: Version: 2.1 Profile: 0 Swap behavior: 2 Buffer size (RGB): 8,8,8 Depth buffer: -1 Stencil buffer: -1Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.1.0 (clang-802.0.42) (Apple)) on "cocoa" OS: macOS Sierra (10.12) [darwin version 16.5.0] Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE Screens: 1, High DPI scaling: inactive # 0 "iMac" Depth: 24 Primary: yes Manufacturer: Model: Serial number: Geometry: 2560x1440+0+0 Available: 2560x1343+0+23 Physical size: 596.55x335.56 mm Refresh: 60 Hz Power state: 0 Physical DPI: 109,109 Logical DPI: 72,72 Subpixel_RGB DevicePixelRatio: 1 Pixel density: 1 Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0 LibGL Vendor: NVIDIA Corporation Renderer: NVIDIA GeForce GTX 780M OpenGL Engine Version: 2.1 NVIDIA-10.16.34 355.10.05.35f05 Shading language: 1.20 Format: Version: 2.1 Profile: 0 Swap behavior: 2 Buffer size (RGB): 8,8,8 Depth buffer: -1 Stencil buffer: -1
Description
The constructor for Qt3DWindow creates a QSurfaceFormat and calls QSurfaceFormat::setDefaultFormat.
This is a problem because:
0) it makes not possible to use Qt3D alongside with QtWebEngine
1) this may prevent the use of a global shared context as QSurfaceFormat::setDefaultFormat has to be called before creation of the QApplication
2) there's no way to change the details of the QSurfaceFormat that is hardcoded in the constructor
3) calling QSurfaceFormat::setDefaultFormat more than once gives this warning:
Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing. (qsurfaceformat.cpp:770, static void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &))
Possible solutions (each with their own positives and negatives):
1) remove it completely and leave it to the application to decide what to use
2) provide a public method Qt3DWindow::initDefaultSurface() as a convenience that does what's currently in the constructor
3) only set it if it hasn't already been set (doesn't really solve all the problems though)
4) (something else I haven't thought of yet)
This may be related to QTBUG-59145 and ------QTBUG-53880