diff options
-rw-r--r-- | src/quick/items/qquickframebufferobject.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp index 758727ed9e..c3e5b97baf 100644 --- a/src/quick/items/qquickframebufferobject.cpp +++ b/src/quick/items/qquickframebufferobject.cpp @@ -386,6 +386,17 @@ QOpenGLFramebufferObject *QQuickFramebufferObject::Renderer::framebufferObject() * the FBO size. * * The FBO will be automatically unbound after the function returns. + * + * \note Do not assume that the OpenGL state is all set to the defaults when + * this function is invoked, or that it is maintained between calls. Both the Qt + * Quick renderer and the custom rendering code uses the same OpenGL + * context. This means that the state might have been modified by Quick before + * invoking this function. + * + * \note It is recommended to call QQuickWindow::resetOpenGLState() before + * returning. This resets OpenGL state used by the Qt Quick renderer and thus + * avoids interference from the state changes made by the rendering code in this + * function. */ /*! |