diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-06 11:42:31 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-08 07:28:41 +0200 |
commit | 41a7072195eef0f7daa94d0ce75a3f68e721d1cb (patch) | |
tree | 91d7acfa5d5ee7f64421d071885c9c43070370a1 /src/gui/kernel | |
parent | 6a237a4e766979ff191818cbdab2c5aa1a6f490b (diff) |
Fix the docs for resizeGL in QOpenGLWindow
Some of it was blindly copied from QOpenGLWidget and it
does not apply.
Change-Id: I73f358f74d286d3757a3a77a9bfe06887d57514a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qopenglwindow.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qopenglwindow.cpp b/src/gui/kernel/qopenglwindow.cpp index 02bf4cb101..c09cd186a6 100644 --- a/src/gui/kernel/qopenglwindow.cpp +++ b/src/gui/kernel/qopenglwindow.cpp @@ -479,9 +479,15 @@ void QOpenGLWindow::initializeGL() This virtual function is called whenever the widget has been resized. Reimplement it in a subclass. The new size is passed in \a w and \a h. - There is no need to call makeCurrent() because this has already been done - when this function is called. Additionally, the framebuffer, if there is one, - is bound too. + \note This is merely a convenience function in order to provide an API that is + compatible with QOpenGLWidget. Unlike with QOpenGLWidget, derived classes are + free to choose to override resizeEvent() instead of this function. + + \note Avoid issuing OpenGL commands from this function as there may not be a + context current when it is invoked. If it cannot be avoided, call makeCurrent(). + + \note Scheduling updates from here is not necessary. The windowing systems + will send expose events that trigger an update automatically. \sa initializeGL(), paintGL() */ |