I’m looking for a GUI toolkit to use in conjunction with OpenGL. QT looks promising but unfortunately it wraps most OpenGL functions in QT classes. Is there any way for me to create an OpenGL 3.3 context in QT and just use the standard C API?
Share
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*