FatalCatharsis
FatalCatharsis

Reputation: 3567

Using QOpenGLContext for rendering in a widget

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?

Upvotes: 1

Views: 681

Answers (1)

László Papp
László Papp

Reputation: 53173

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

Upvotes: 1

Related Questions