diff options
author | Morten Johan Sorvig <morten.sorvig@digia.com> | 2012-10-23 11:31:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-03 00:24:37 +0100 |
commit | 9830ba007a36b9923b7c10d33740952c54cf86e0 (patch) | |
tree | c341e9eb10a185082dced4c06733064d0cb6be89 /src | |
parent | efc9b77a6e9a0efe0c260a4a7fe18bf3f87a8f13 (diff) |
Make QGLWidget::paintGL() call glClear().
Creating and displaying a plain QGLWidget on Mac would
display "garbage" or previous frame buffer content
on screen. This looks broken and raises interesting
privacy concerns.
Fix by adding a call to glClear().
Change-Id: I507c24275e41fac0be5f518c5a70d151099ae6b8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qgl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 9b456f6a64..817b7c329b 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3854,6 +3854,7 @@ void QGLWidget::initializeGL() void QGLWidget::paintGL() { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } |