From d45502c2aa69fdb0b97c33de2bcc2ae6986f2e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 10 Oct 2011 14:56:30 +0200 Subject: Fixed some doc errors in QOpenGLFramebufferObject. Change-Id: Ic132bc31f87900a492a80767aa247c71c48c4a10 Reviewed-on: http://codereview.qt-project.org/6334 Sanity-Review: Qt Sanity Bot Reviewed-by: Casper van Donderen --- src/gui/opengl/qopenglframebufferobject.cpp | 44 +++++++++-------------------- src/gui/opengl/qopenglframebufferobject.h | 1 - 2 files changed, 14 insertions(+), 31 deletions(-) (limited to 'src/gui') 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} */ @@ -952,6 +924,18 @@ QSize QOpenGLFramebufferObject::size() const return d->size; } +/*! + \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. */ @@ -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(); -- cgit v1.2.3