QOpenGLWidget with QApplication?

落花浮王杯 提交于 2019-12-05 16:04:35

I am doing a little guess work here.

Probably your OpenGL is defaulting to ANGLE. And your previous application OpenGL calls are platform specific OpenGL API.

try setting below attribute to your QApplication object.

appObject->setAttribute(Qt::AA_UseDesktopOpenGL, true);

then try calling

QOpenGLWidget::makeCurrent();

If things are still not working, configure your QT libraries for desktop OpenGL.

configure -opengl desktop

the below link gives you some information on Qt approach to OpenGL. http://doc.qt.io/qt-5/windows-requirements.html

Put in comments, if this is not helping you, will delete the answer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!