Specifying OpenGL Desktop instead of ES for Qt5

前端 未结 1 1591
逝去的感伤
逝去的感伤 2021-01-23 08:09

I am finally trying to wrap my head around shaders, using a tutorial I found. I decided to start with Qt5 (Windows) since I\'m familiar with it and can focus on learning GLSL it

1条回答
  •  佛祖请我去吃肉
    2021-01-23 08:47

    Qt5 on Windows will use ANGLE as a fallback (emulating OpenGL ES 2.0 with Direct3D) if either the video card is blacklisted (in ANGLE configuration at the time Qt was compiled) or the video driver does not support modern OpenGL (i.e. if you have only the stock driver provided by Microsoft).

    You can force the application to use OpenGL instead of angle by adding:

    QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);

    in your main.cpp file or by setting the environment variable QT_OPENGL to "desktop" (without quotes). You can find more details here: http://doc.qt.io/qt-5/windows-requirements.html

    0 讨论(0)
提交回复
热议问题