diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-03-25 15:03:51 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-27 14:29:43 +0100 |
commit | 75f9c75f0a56d4531b219775e3c79eee3b7a8d6d (patch) | |
tree | 501b0994c21d78874560a7d8c978251fb147defe /src/gui/kernel | |
parent | ad1c088a2a5c52a5c95075e1e24dfc31aa41b6c1 (diff) |
Enhance QOffscreenSurface docs wrt the format
Prevent nasty surprises on some EGL implementations.
Change-Id: I0c6c8a6c631d4dcb979afd81a150491a42aa63f8
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qoffscreensurface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp index ce913a98af..1625909843 100644 --- a/src/gui/kernel/qoffscreensurface.cpp +++ b/src/gui/kernel/qoffscreensurface.cpp @@ -71,6 +71,14 @@ QT_BEGIN_NAMESPACE How the offscreen surface is implemented depends on the underlying platform, but it will typically use a pixel buffer (pbuffer). If the platform doesn't implement or support offscreen surfaces, QOffscreenSurface will use an invisible QWindow internally. + + \note In order to create an offscreen surface that is guaranteed to be compatible with + a given context and window, make sure to set the format to the context's or the + window's actual format, that is, the QSurfaceFormat returned from + QOpenGLContext::format() or QWindow::format() \e{after the context or window has been + created}. Passing the format returned from QWindow::requestedFormat() to setFormat() + may result in an incompatible offscreen surface since the underlying windowing system + interface may offer a different set of configurations for window and pbuffer surfaces. */ class Q_GUI_EXPORT QOffscreenSurfacePrivate : public QObjectPrivate { |