summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-10-10 14:56:30 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-10 16:54:52 +0200
commitd45502c2aa69fdb0b97c33de2bcc2ae6986f2e4f (patch)
tree49b0a19be55fa20cda3df42af54c6e8f58dab83a /src
parent0e611c34d76b74ad7c4a610ea6593eae0f1fbfa8 (diff)
Fixed some doc errors in QOpenGLFramebufferObject.
Change-Id: Ic132bc31f87900a492a80767aa247c71c48c4a10 Reviewed-on: http://codereview.qt-project.org/6334 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp44
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h1
2 files changed, 14 insertions, 31 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index fe252dfa9f..f08cab81d6 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -628,32 +628,6 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
\bold{It is important to have a current GL context when creating a
QOpenGLFramebufferObject, otherwise initialization will fail.}
- OpenGL framebuffer objects and pbuffers (see
- \l{QOpenGLPixelBuffer}{QOpenGLPixelBuffer}) can both be used to render to
- offscreen surfaces, but there are a number of advantages with
- using framebuffer objects instead of pbuffers:
-
- \list 1
- \o A framebuffer object does not require a separate rendering
- context, so no context switching will occur when switching
- rendering targets. There is an overhead involved in switching
- targets, but in general it is cheaper than a context switch to a
- pbuffer.
-
- \o Rendering to dynamic textures (i.e. render-to-texture
- functionality) works on all platforms. No need to do explicit copy
- calls from a render buffer into a texture, as was necessary on
- systems that did not support the \c{render_texture} extension.
-
- \o It is possible to attach several rendering buffers (or texture
- objects) to the same framebuffer object, and render to all of them
- without doing a context switch.
-
- \o The OpenGL framebuffer extension is a pure GL extension with no
- system dependant WGL, CGL, or GLX parts. This makes using
- framebuffer objects more portable.
- \endlist
-
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.
@@ -678,8 +652,6 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
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.
-
- \sa {Framebuffer Object Example}
*/
@@ -953,6 +925,18 @@ QSize QOpenGLFramebufferObject::size() const
}
/*!
+ \fn int QOpenGLFramebufferObject::width() const
+
+ Returns the width of the framebuffer object attachments.
+*/
+
+/*!
+ \fn int QOpenGLFramebufferObject::height() const
+
+ Returns the height of the framebuffer object attachments.
+*/
+
+/*!
Returns the format of this framebuffer object.
*/
QOpenGLFramebufferObjectFormat QOpenGLFramebufferObject::format() const
@@ -1148,9 +1132,9 @@ bool QOpenGLFramebufferObject::hasOpenGLFramebufferBlit()
/*!
\overload
- \sa blitFramebuffer
-*/
+ Convenience overload to blit between two framebuffer objects.
+*/
void QOpenGLFramebufferObject::blitFramebuffer(QOpenGLFramebufferObject *target,
QOpenGLFramebufferObject *source,
GLbitfield buffers, GLenum filter)
diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/gui/opengl/qopenglframebufferobject.h
index 17ee74aa94..8a57784f4f 100644
--- a/src/gui/opengl/qopenglframebufferobject.h
+++ b/src/gui/opengl/qopenglframebufferobject.h
@@ -100,7 +100,6 @@ public:
QImage toImage() const;
Attachment attachment() const;
- QPaintEngine *paintEngine() const;
GLuint handle() const;
static bool bindDefault();