From 41a7072195eef0f7daa94d0ce75a3f68e721d1cb Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 6 Aug 2014 11:42:31 +0200 Subject: 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 --- src/gui/kernel/qopenglwindow.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/gui/kernel/qopenglwindow.cpp') 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() */ -- cgit v1.2.3