Restore multisampled FBOs on ANGLE

The function resolving changes remove the special treatment for ES 3.0+
contexts, meaning that now all functions get resolved in the same way
irrespective of the current context.

For blitFramebuffer and renderbufferStorageMultisample this presented an
issue with ANGLE. There these functions are available both as an ANGLE
extension and as standard ES 3.0 functions. The latter are not functional
however in 2.0 contexts. We expect multisampled FBOs to work in 2.0
contexts too by prefering the ANGLE extension with 2.0 contexts.

Change-Id: I0a4b70e6d39c84d4b1f61f8fd0655d7326419a2a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
bb10
Laszlo Agocs 2016-02-18 16:43:02 +01:00
parent 696dc4f6df
commit 752e85947c
1 changed files with 17 additions and 1 deletions

View File

@ -538,7 +538,23 @@ void QWindowsEGLContext::swapBuffers(QPlatformSurface *surface)
QFunctionPointer QWindowsEGLContext::getProcAddress(const char *procName)
{
QWindowsEGLStaticContext::libEGL.eglBindAPI(m_api);
QFunctionPointer procAddress = reinterpret_cast<QFunctionPointer>(QWindowsEGLStaticContext::libEGL.eglGetProcAddress(procName));
QFunctionPointer procAddress = nullptr;
// Special logic for ANGLE extensions for blitFramebuffer and
// renderbufferStorageMultisample. In version 2 contexts the extensions
// must be used instead of the suffixless, version 3.0 functions.
if (m_format.majorVersion() < 3) {
if (!strcmp(procName, "glBlitFramebuffer") || !strcmp(procName, "glRenderbufferStorageMultisample")) {
char extName[32 + 5 + 1];
strcpy(extName, procName);
strcat(extName, "ANGLE");
procAddress = reinterpret_cast<QFunctionPointer>(QWindowsEGLStaticContext::libEGL.eglGetProcAddress(extName));
}
}
if (!procAddress)
procAddress = reinterpret_cast<QFunctionPointer>(QWindowsEGLStaticContext::libEGL.eglGetProcAddress(procName));
// We support AllGLFunctionsQueryable, which means this function must be able to
// return a function pointer for standard GLES2 functions too. These are not