[Interest] QWindow::setTransientParent()

Agocs Laszlo laszlo.agocs at theqtcompany.com
Mon Nov 24 09:55:29 CET 2014


renderPixmap() can be replaced with a call to grabFramebuffer(). They both perform (potentially expensive) readbacks.

There is no direct replacement for renderText(). Then again renderText is pretty broken anyway when it comes to depth handling so it is best to avoid it even when using QGLWidget. One workaround would be to render the labels into a QImage and then use those as textures and draw quads at the correct position in the scene.

Best regards,
Laszlo

________________________________________
From: interest-bounces+laszlo.agocs=theqtcompany.com at qt-project.org <interest-bounces+laszlo.agocs=theqtcompany.com at qt-project.org> on behalf of John Weeks <john at wavemetrics.com>
Sent: Friday, November 21, 2014 11:12 PM
To: interest at qt-project.org
Subject: Re: [Interest] QWindow::setTransientParent()

Shawn-

> QGLWidget is obsolete, because it has the disadvantage of requiring its own platform window for the GL content to render into, which has caused various problems over the years.  QOpenGLWidget (new in Qt 5.4) simplifies some things: Qt uses FBO tricks to composite the OpenGL content and the other widgets into a single window.  So you should probably try to switch from QGLWidget to QOpenGLWidget.

We have now done this, and it has solved a nagging problem we were having. Thank you!

There are a couple of things missing from QOpenGLWidget compared to QGLWidget: renderText() and renderPixmap().

We were using renderPixmap() to export graphics at resolution higher than what is displayed on-screen. And renderText() was being used for plotting data with text as the data point markers.

Are there alternatives to these for QOpenGLWidget?

-John Weeks


_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list