From 75f9c75f0a56d4531b219775e3c79eee3b7a8d6d Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 25 Mar 2014 15:03:51 +0100 Subject: Enhance QOffscreenSurface docs wrt the format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent nasty surprises on some EGL implementations. Change-Id: I0c6c8a6c631d4dcb979afd81a150491a42aa63f8 Reviewed-by: Jørgen Lind --- src/gui/kernel/qoffscreensurface.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gui/kernel') 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 { -- cgit v1.2.3