diff options
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r-- | src/gui/opengl/qopenglfunctions.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 8ddb693e73..2b8488ab0e 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -423,11 +423,14 @@ static int qt_gl_resolve_extensions() // We don't match GL_APPLE_texture_format_BGRA8888 here because it has different semantics. if (extensionMatcher.match("GL_IMG_texture_format_BGRA8888") || extensionMatcher.match("GL_EXT_texture_format_BGRA8888")) extensions |= QOpenGLExtensions::BGRATextureFormat; - if (extensionMatcher.match("GL_EXT_discard_framebuffer")) extensions |= QOpenGLExtensions::DiscardFramebuffer; + if (extensionMatcher.match("GL_EXT_texture_norm16")) + extensions |= QOpenGLExtensions::Sized16Formats; } else { - extensions |= QOpenGLExtensions::ElementIndexUint | QOpenGLExtensions::MapBuffer; + extensions |= QOpenGLExtensions::ElementIndexUint + | QOpenGLExtensions::MapBuffer + | QOpenGLExtensions::Sized16Formats; if (format.version() >= qMakePair(1, 2)) extensions |= QOpenGLExtensions::BGRATextureFormat; @@ -3212,7 +3215,9 @@ Q_GLOBAL_STATIC(QOpenGLES3Helper, qgles3Helper) bool QOpenGLES3Helper::init() { -#ifndef Q_OS_IOS +#ifdef QT_NO_LIBRARY + return false; +#elif !defined(Q_OS_IOS) # ifdef Q_OS_WIN # ifndef QT_DEBUG m_gl.setFileName(QStringLiteral("libGLESv2")); @@ -3236,8 +3241,11 @@ QFunctionPointer QOpenGLES3Helper::resolve(const char *name) { #ifdef Q_OS_IOS return QFunctionPointer(dlsym(RTLD_DEFAULT, name)); -#else +#elif !defined(QT_NO_LIBRARY) return m_gl.resolve(name); +#else + Q_UNUSED(name); + return 0; #endif } |