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>
This commit is contained in:
parent
12ce167a96
commit
0b153bc93a
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user