summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-07-29 15:39:28 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-08-04 13:13:54 +0000
commitabbf82bdfcf0a233553cceb73d4cff56b6cd273d (patch)
tree600eb7b3fd37f600b4aef04a1060b881d7adb851 /src/platformsupport/eglconvenience/qeglplatformcontext_p.h
parent1767c94e9e5a47b0049ac6edb4b1d7d0bcfc22ce (diff)
Make EGL context init work when msaa is requested but there's no surfaceless
To query back certain things, like the actual OpenGL version from the created context, the eglconvenience code makes the new context current either without a surface (in case EGL_KHR_surfaceless_context is supported) or with a pbuffer (or other platform specific equivalent). There is no problem with the former. The latter can however fail when samples are requested for the context and there are no matching pbuffer configs. The result is a pbuffer without multisampling, which could lead to a BAD_MATCH. This is visible on GLES 2.0 devices like the Beaglebone. The solution is to fall back to creating a new, temporary context with a config matching the pbuffer's whenever the makeCurrent attempt fails. Change-Id: Icd9f3383f2cad36dd5b60dead655328b7b9af658 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext_p.h')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index 50c264e1dc..2ab7ad28d0 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -94,6 +94,7 @@ private:
bool m_swapIntervalEnvChecked;
int m_swapIntervalFromEnv;
bool m_ownsContext;
+ QVector<EGLint> m_contextAttrs;
};
QT_END_NAMESPACE