summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2014-03-06 12:31:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-06 17:22:55 +0100
commit82288308ecbe1481d82bee78ec59855b69d24391 (patch)
tree6175df4a3eadf3305fa4cbaa941ada6872dddf3d
parent6b4b3c7ef652b4f14335b65183f03718731cab75 (diff)
Doc fix
QOpenGLContext::destroy() is private. The recommended way to free resources temporarily is simply to delete the context. Change-Id: I0d59b55afb209d56405f3584e4645bd4718790af Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
-rw-r--r--src/gui/kernel/qopenglcontext.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 005f716788..f68915edeb 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -257,12 +257,10 @@ QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex;
rendering a new frame, after calling swapBuffers().
If the context is temporarily not needed, such as when the application is
- not rendering, it can be useful to call destroy() to free resources.
- However, if you do so you will need to call create() again before the
- context can be used, and you might need to recreate any OpenGL resources
- and reinitialize the OpenGL state. You can connect to the
- aboutToBeDestroyed() signal to clean up any resources that have been
- allocated with different ownership from the QOpenGLContext itself.
+ not rendering, it can be useful to delete it in order to free resources.
+ You can connect to the aboutToBeDestroyed() signal to clean up any
+ resources that have been allocated with different ownership from the
+ QOpenGLContext itself.
Once a QOpenGLContext has been made current, you can render to it in a
platform independent way by using Qt's OpenGL enablers such as