Using OpenGL on QT without the wrappers [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-04 11:18:50

There's no need for you to use most of the QT specific OpenGL classes. You need the QGLWidget context itself, something to tell QT when to repaint the widget (that can just be a timer that calls updateGL() on your QTGLWidget 60 times a second) and the event handling. Just make a class that inherits from the QGLWiget and put your C-type OpenGL code in the paintGL() function.

If you want some sample code: https://github.com/dcbishop/g3test check in src/Application/QT*

The QopenGL widget gives you the context, you then simply override the initialiseGL, paintGL methods and you can use raw openGL calls directly.

The Qt wrappers around PBO and VBOs are convenient to save doing all the manual DLL loading on Windows but aren't really necessary

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