[Interest] Qt 5.4 Beta with Qt3D's QGLPainter

Jonathan Poncelet jonathan.poncelet at talk21.com
Thu Nov 20 17:32:56 CET 2014


Hi all,

I’m attempting to use the QGLPainter from Qt3D with Qt 5.4’s new QOpenGLWidget - I was originally making do with QGLWidget from the previous Qt version but I was running into trouble with putting widgets, buttons, etc. on top of the GL widget, which is something I need to do. I’m fairly familiar with the Qt3D library but not so much on the in-depth side, and right now if I call begin() on a QGLPainter I create in the QOpenGLWidget’s paintGL() function, I get the following messages output before the program crashes:

Attempt to cast non-window surface
Attempt to activate GL window surface on bad context

I’ve tried various things - calling begin() and passing the widget’s GL context doesn’t have any effect, and the function won’t accept the context's QSurface as it’s expecting a QGLSurface. Is there any way to get QGLPainter working with the new QOpenGLWidget, or will I have to stick with QGLWidget?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141121/a789cf65/attachment.html>


More information about the Interest mailing list