From 819cad6670fd5ae7f36bcae9750bb180e92cb206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 6 Aug 2018 13:11:07 +0200 Subject: [PATCH] Be more explicit about the effects of swapBuffers() on the current context Change-Id: I7ab9e4e7323d49cf19774bfd0c51f8516ecb842d Reviewed-by: Laszlo Agocs --- src/gui/kernel/qopenglcontext.cpp | 3 ++- src/opengl/qgl.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 4efa5a40f3..a49599b4d1 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -1078,7 +1078,8 @@ QSurface *QOpenGLContext::surface() const Swap the back and front buffers of \a surface. Call this to finish a frame of OpenGL rendering, and make sure to - call makeCurrent() again before you begin a new frame. + call makeCurrent() again before issuing any further OpenGL commands, + for example as part of a new frame. */ void QOpenGLContext::swapBuffers(QSurface *surface) { diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 1132411d42..e136ddcff2 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3603,7 +3603,8 @@ void QGLContext::makeCurrent() \fn void QGLContext::swapBuffers() const Call this to finish a frame of OpenGL rendering, and make sure to - call makeCurrent() again before you begin a new frame. + call makeCurrent() again before issuing any further OpenGL commands, + for example as part of a new frame. */ void QGLContext::swapBuffers() const {