Skip to content

Commit 8c6c6ea

Browse files
committed
Fix OpenGL possibly not working on Windows
On Windows, Qt 5 prefers ANGLE or software renderer over some native OpenGL drivers. However the statically linked immediate mode fixed function OpenGL code in Maverick does not work in those cases. (Model viewports and texture widgets are just black.) So tell Qt to always use the native OpenGL driver.
1 parent 4bd981e commit 8c6c6ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/implui/qtmain.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ QApplication * ui_getapp()
133133

134134
int ui_prep( int & argc, char * argv[] )
135135
{
136+
// Don't use OpenGL ES (ANGLE, software) on Windows
137+
// (It must be set before QApplication is created)
138+
QCoreApplication::setAttribute( Qt::AA_UseDesktopOpenGL );
139+
136140
s_app = new ModelApp( argc, argv );
137141

138142
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))

0 commit comments

Comments
 (0)