diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-12 10:57:45 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-14 11:02:42 +0200 |
commit | 0b153bc93a9a954222fadce54da89476900b3f32 (patch) | |
tree | 4a391d1e6b80d2107f61ac058ef263d6576857ef /src/platformsupport/eglconvenience | |
parent | 12ce167a965d527f2180f6db010d742adf39967c (diff) |
Make sure to have a pbuffer-capable config for the temp pbuffer
The temporary pbuffer has to have a config that is pbuffer capable.
Otherwise the makeCurrent() can potentially fail with drivers that
strictly differentiate between the different configurations.
Change-Id: Id63f52da5c5a1308072b1f1bb4b297ea6a547166
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/platformsupport/eglconvenience')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp index 9691d12682..148c5d9b2f 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp @@ -256,7 +256,11 @@ void QEGLPlatformContext::updateFormatFromGL() EGL_LARGEST_PBUFFER, EGL_FALSE, EGL_NONE }; - EGLSurface pbuffer = eglCreatePbufferSurface(m_eglDisplay, m_eglConfig, pbufferAttributes); + // Cannot just pass m_eglConfig because it may not be suitable for pbuffers. Instead, + // do what QEGLPbuffer would do: request a config with the same attributes but with + // PBUFFER_BIT set. + EGLConfig config = q_configFromGLFormat(m_eglDisplay, m_format, false, EGL_PBUFFER_BIT); + EGLSurface pbuffer = eglCreatePbufferSurface(m_eglDisplay, config, pbufferAttributes); if (pbuffer == EGL_NO_SURFACE) return; |