path: root/src/opengl/qgl.cpp
diff options
authorFabian Bumberger <>2014-03-17 17:45:08 +0100
committerThe Qt Project <>2014-04-01 23:35:21 +0200
commit2c36469a16f166a3b4e513cccf8186157952bba0 (patch)
tree250c3eeaefbc2034583ee64975592c3254bf0f16 /src/opengl/qgl.cpp
parent30b334ffebb13876d89395f6ac253b7741920efe (diff)
QNX: Fix OpenGL autotest
On QNX grabbing the frame buffer returns the content of the back buffer. In order to execute the OpenGL tests properly a swapBuffers is executed before in order to be able to retrieve the content of the front buffer. The patch also documents this platform behavior. Change-Id: I7a501818ec6eea061f2f54f95854f68cb72e0534 Reviewed-by: James McDonnell <> Reviewed-by: Sean Harmer <>
Diffstat (limited to 'src/opengl/qgl.cpp')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index e602a05af9..637cfc55a8 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4083,6 +4083,11 @@ QPixmap QGLWidget::renderPixmap(int w, int h, bool useContext)
Depending on your hardware, you can explicitly select which color
buffer to grab with a glReadBuffer() call before calling this
+ On QNX the back buffer is not preserved when swapBuffers() is called. The back buffer
+ where this function reads from, might thus not contain the same content as the front buffer.
+ In order to retrieve what is currently visible on the screen, swapBuffers()
+ has to be executed prior to this function call.
QImage QGLWidget::grabFrameBuffer(bool withAlpha)