Fixed QOpenGLFramebufferObject docs to mention QOpenGLPaintDevice.
Task-number: QTBUG-29496 Change-Id: Id9ec5e2a070992f53bba58468e2472513d52cb8b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
7ac58d1ff0
commit
ff86f6ba4c
@ -686,24 +686,23 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
|
|||||||
\ingroup painting-3D
|
\ingroup painting-3D
|
||||||
|
|
||||||
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer
|
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer
|
||||||
object, defined by the \c{GL_EXT_framebuffer_object} extension. In
|
object, defined by the \c{GL_EXT_framebuffer_object} extension. It provides
|
||||||
addition it provides a rendering surface that can be painted on
|
a rendering surface that can be painted on with a QPainter with the help of
|
||||||
with a QPainter, rendered to using native OpenGL calls, or both. This
|
QOpenGLPaintDevice, or rendered to using native OpenGL calls. This surface
|
||||||
surface can be bound and used as a regular texture in your own OpenGL
|
can be bound and used as a regular texture in your own OpenGL drawing code.
|
||||||
drawing code. By default, the QOpenGLFramebufferObject class
|
By default, the QOpenGLFramebufferObject class generates a 2D OpenGL
|
||||||
generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target),
|
texture (using the \c{GL_TEXTURE_2D} target), which is used as the internal
|
||||||
which is used as the internal rendering target.
|
rendering target.
|
||||||
|
|
||||||
\b{It is important to have a current OpenGL context when creating a
|
\b{It is important to have a current OpenGL context when creating a
|
||||||
QOpenGLFramebufferObject, otherwise initialization will fail.}
|
QOpenGLFramebufferObject, otherwise initialization will fail.}
|
||||||
|
|
||||||
When using a QPainter to paint to a QOpenGLFramebufferObject you should take
|
Create the QOpenGLFrameBufferObject instance with the CombinedDepthStencil
|
||||||
care that the QOpenGLFramebufferObject is created with the CombinedDepthStencil
|
attachment if you want QPainter to render correctly. Note that you need to
|
||||||
attachment for QPainter to be able to render correctly.
|
create a QOpenGLFramebufferObject with more than one sample per pixel for
|
||||||
Note that you need to create a QOpenGLFramebufferObject with more than one
|
primitives to be antialiased when drawing using a QPainter. To create a
|
||||||
sample per pixel for primitives to be antialiased when drawing using a
|
multisample framebuffer object you should use one of the constructors that
|
||||||
QPainter. To create a multisample framebuffer object you should use one of
|
take a QOpenGLFramebufferObject parameter, and set the
|
||||||
the constructors that take a QOpenGLFramebufferObject parameter, and set the
|
|
||||||
QOpenGLFramebufferObject::samples() property to a non-zero value.
|
QOpenGLFramebufferObject::samples() property to a non-zero value.
|
||||||
|
|
||||||
For multisample framebuffer objects a color render buffer is created,
|
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
|
as a texture, you first need to copy from it to a regular framebuffer
|
||||||
object using QOpenGLContext::blitFramebuffer().
|
object using QOpenGLContext::blitFramebuffer().
|
||||||
|
|
||||||
\section1 Threading
|
It is possible to draw into a QOpenGLFramebufferObject using QPainter and
|
||||||
|
QOpenGLPaintDevice in a separate thread.
|
||||||
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.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user