GLEW and Qt5 redefinition of headers

谁说胖子不能爱 提交于 2019-12-05 01:27:33

My personal approach with using OpenGL with Qt is to separate all OpenGL related part from Qt class implementation. In the Qt part I then just call into the framework neutral written OpenGL code through regular C or C++ interfaces using standard types. Since the actual OpenGL code makes no references to Qt then, it doesn't have to include Qt headers, avoiding problems like yours.

After a day of screwing around I have a solution!

In order to be cross platform Qt seems to have set OpenGLES to a high priority than desktop openGL.

THe solution to this is to build Qt from source code suing the setting -opengl desktop before you build. Something like this:

configure -debug-and-release -opengl desktop

Then use nmake to build and it works fine!

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