summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2013-02-12 15:20:27 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-14 10:55:33 +0100
commitff86f6ba4c730941e13e45c670828bb07d92c380 (patch)
tree81ebaec78fe4a291586d9c74c7d1759096b9c8e2 /src/gui
parent7ac58d1ff0815566ba1de09519299b5119e5ee91 (diff)
Fixed QOpenGLFramebufferObject docs to mention QOpenGLPaintDevice.
Task-number: QTBUG-29496 Change-Id: Id9ec5e2a070992f53bba58468e2472513d52cb8b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index 8e92ab5d58..2a9caac030 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -686,24 +686,23 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
\ingroup painting-3D
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer
- object, defined by the \c{GL_EXT_framebuffer_object} extension. In
- addition it provides a rendering surface that can be painted on
- with a QPainter, rendered to using native OpenGL calls, or both. This
- surface can be bound and used as a regular texture in your own OpenGL
- drawing code. By default, the QOpenGLFramebufferObject class
- generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target),
- which is used as the internal rendering target.
+ object, defined by the \c{GL_EXT_framebuffer_object} extension. It provides
+ a rendering surface that can be painted on with a QPainter with the help of
+ QOpenGLPaintDevice, or rendered to using native OpenGL calls. This surface
+ can be bound and used as a regular texture in your own OpenGL drawing code.
+ By default, the QOpenGLFramebufferObject class generates a 2D OpenGL
+ texture (using the \c{GL_TEXTURE_2D} target), which is used as the internal
+ rendering target.
\b{It is important to have a current OpenGL context when creating a
QOpenGLFramebufferObject, otherwise initialization will fail.}
- When using a QPainter to paint to a QOpenGLFramebufferObject you should take
- care that the QOpenGLFramebufferObject is created with the CombinedDepthStencil
- attachment for QPainter to be able to render correctly.
- Note that you need to create a QOpenGLFramebufferObject with more than one
- sample per pixel for primitives to be antialiased when drawing using a
- QPainter. To create a multisample framebuffer object you should use one of
- the constructors that take a QOpenGLFramebufferObject parameter, and set the
+ Create the QOpenGLFrameBufferObject instance with the CombinedDepthStencil
+ attachment if you want QPainter to render correctly. Note that you need to
+ create a QOpenGLFramebufferObject with more than one sample per pixel for
+ primitives to be antialiased when drawing using a QPainter. To create a
+ multisample framebuffer object you should use one of the constructors that
+ take a QOpenGLFramebufferObject parameter, and set the
QOpenGLFramebufferObject::samples() property to a non-zero value.
For multisample framebuffer objects a color render buffer is created,
@@ -716,11 +715,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
as a texture, you first need to copy from it to a regular framebuffer
object using QOpenGLContext::blitFramebuffer().
- \section1 Threading
-
- As of Qt 4.8, it's possible to draw into a QOpenGLFramebufferObject
- using a QPainter in a separate thread. Note that OpenGL 2.0 or
- OpenGL ES 2.0 is required for this to work.
+ It is possible to draw into a QOpenGLFramebufferObject using QPainter and
+ QOpenGLPaintDevice in a separate thread.
*/