Using OpenGL on QT without wrappers

I am looking for a GUI toolkit for use in conjunction with OpenGL. QT looks promising, but unfortunately, it covers most of the features of OpenGL in QT classes. Is there a way to create an OpenGL 3.3 context in QT and just use the standard C API?

+4
source share
2 answers

You do not need to use most of the OpenGL classes specific to QT. You need the QGLWidget context itself, say something to QT when you need to redraw the widget (it could just be a timer that calls updateGL () on QTGLWidget 60 times per second) and event processing. Just create a class that inherits from QGLWiget, and put your C-type OpenGL code in the paintGL () function.

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

+5
source

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

Qt wrappers around PBOs and VBOs are conveniently maintained by performing all manual loading of DLLs in Windows, but are not really required

+1
source

Source: https://habr.com/ru/post/1402562/


All Articles