Question

I have been reading various material online trying to figure out how to do OpenGL rendering in Qt these days, and apparently the old QGL modules have been deprecated. I really like the new QOpenGLContext and it's ability to initialize the open gl functions rather than needing to use GLEW. However, I can't figure out how to use these function in a widget like i could with QGLWidget. I need to place buttons and other widgets around the surface that i want to render with OpenGL to, but all the tutorials and examples online just show that i'm supposed to use the whole QWindow as a rendering surface. So how can i use the new convenient API while rendering to a widget in Qt?

Was it helpful?

Solution

There is no direct replacement for QGLWidget just yet. This is scheduled for 5.4, so not earlier than Christmas this year.

See the corresponding issue on Jira:

Add QOpenGLWidget and QOpenGLWindow

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top