Commit 23608d33 authored by Don Gagne's avatar Don Gagne

Merge pull request #2798 from NaterGator/opengl-buglist

Custom OpenGL buglist to workaround broken OpenGL drivers in Windows
parents 68908488 80b7a1e9
......@@ -70,6 +70,8 @@ Section "create Start Menu Shortcuts"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl (GPU Compatibility Mode).lnk" "$INSTDIR\qgroundcontrol.exe" "-angle" "$INSTDIR\qgroundcontrol.exe" 0
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl (GPU Safe Mode).lnk" "$INSTDIR\qgroundcontrol.exe" "-swrast" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd
Function .onInit
......
......@@ -236,4 +236,7 @@
<qresource prefix="/FirmwarePlugin/APM">
<file alias="apm.pdef.xml">src/FirmwarePlugin/APM/apm.pdef.xml</file>
</qresource>
<qresource prefix="/opengl">
<file>resources/opengl/buglist.json</file>
</qresource>
</RCC>
{
"name": "QGroundControl OpenGL Driver Blacklist",
"version": "5.5",
"entries": [
{
"id": 1,
"description": "Desktop OpenGL is unreliable on some Intel HD laptops (QTBUG-43263, QTBUG-42240)",
"vendor_id": "0x8086",
"device_id": [ "0x0A16" ],
"os": {
"type": "win"
},
"driver_version": {
"op": "<=",
"value": "10.18.10.3277"
},
"features": [
"disable_desktopgl"
]
},
{
"id": 2,
"description": "Desktop OpenGL is unreliable on some Intel Mobile GMA Devices",
"vendor_id": "0x8086",
"device_id": [ "0x2972", "0x2973",
"0x2992", "0x2993",
"0x29A2", "0x29A3",
"0x2982", "0x2983",
"0x2A02", "0x2A03", "0x2A12", "0x2A13",
"0x2E42", "0x2E43", "0x2E92", "0x2E93",
"0x2E12", "0x2E13",
"0x2E32", "0x2E33",
"0x2E22", "0x2E23",
"0x2A42", "0x2A43",
"0x2E5B",
"0x8108", "0x8109",
"0x4102",
"0x0BE0", "0x0BE1", "0x0BE2", "0x0BE0",
"0x08C7", "0x08C8", "0x08C9", "0x08CA", "0x08CB", "0x08CC", "0x08CD", "0x08CE", "0x08CF"
],
"os": {
"type": "win"
},
"features": [
"disable_desktopgl"
]
}
]
}
......@@ -139,9 +139,25 @@ int main(int argc, char *argv[])
#endif
#endif
// install the message handler
#ifdef Q_OS_WIN
// install the message handler
qInstallMessageHandler(msgHandler);
// Set our own OpenGL buglist
qputenv("QT_OPENGL_BUGLIST", ":/opengl/resources/opengl/buglist.json");
// Allow for command line override of renderer
for (int i = 0; i < argc; i++) {
const QString arg(argv[i]);
if (arg == QStringLiteral("-angle")) {
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
break;
} else if (arg == QStringLiteral("-swrast")) {
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
break;
}
}
#endif
// The following calls to qRegisterMetaType are done to silence debug output which warns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment