Improve setDefaultFormat docs regarding AA_ShareOpenGLContexts

When using core profile contexts, sharing with the global share context
may not work if the global one is a non-core context. This can happen
when setDefaultFormat() is called only after Q(Gui)Application is
constructed. This is a typical issue on OS X, so document it.

Change-Id: I6a8dca442ffeb884faedb9c6346351bb6eef3cff
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
Laszlo Agocs 2015-02-25 15:16:13 +01:00 committed by Laszlo Agocs
parent 8b0b24064e
commit 9021639f41

View File

@ -747,6 +747,12 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format)
and surfaces, even the ones created internally by Qt, will use the same
format.
\note When setting Qt::AA_ShareOpenGLContexts, it is strongly recommended to
place the call to this function before the construction of the
QGuiApplication or QApplication. Otherwise \a format will not be applied to
the global share context and therefore issues may arise with context sharing
afterwards.
\since 5.4
\sa defaultFormat()
*/