summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-12-17 04:54:05 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-12-17 04:54:05 (GMT)
commitcc5ae2db39bd5cb5e7710b1b7ce1b5c92b705450 (patch)
treed0fb5ff39dc5be14d634d9079446c775a8cf11d0 /src/opengl/qglframebufferobject.cpp
parent65fe21e8c1cfb70e5b763818928c6570bb67b5e3 (diff)
downloadQt-cc5ae2db39bd5cb5e7710b1b7ce1b5c92b705450.zip
Qt-cc5ae2db39bd5cb5e7710b1b7ce1b5c92b705450.tar.gz
Qt-cc5ae2db39bd5cb5e7710b1b7ce1b5c92b705450.tar.bz2
Update FBO docs to describe how QPainter changes the GL state
Using a QPainter on a QGLFramebufferObject will not return the GL context to its original conditions, especially with the OpenGL2 paint engine. Update the docs to make this clearer. Task-number: QTBUG-6712 Reviewed-by: Daniel Pope
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r--src/opengl/qglframebufferobject.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index d0297c9..4b5c30a 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -597,6 +597,12 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
the constructors that take a QGLFramebufferObject parameter, and set the
QGLFramebufferObject::samples() property to a non-zero value.
+ When painting to a QGLFramebufferObject using QPainter, the state of
+ the current GL context will be altered by the paint engine to reflect
+ its needs. Applications should not rely upon the GL state being reset
+ to its original conditions, particularly the current shader program,
+ GL viewport, texture units, and drawing modes.
+
For multisample framebuffer objects a color render buffer is created,
otherwise a texture with the specified texture target is created.
The color render buffer or texture will have the specified internal