summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-11 17:26:05 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-12 12:36:42 +0000
commit53b83ac413b3dfde437fefbfdf329f9f7bcda283 (patch)
tree290662f6e087f4ce32ca68f6eedc21b61c55b427 /src/gui/opengl/qopenglfunctions.cpp
parent8b81f89dffe1ef89403ad8db0777da124057700a (diff)
Don't try to load opengl extensions or functions without QLibrary
Change-Id: If77ca6e04c83d94fd3063b68963b1bcd90980d99 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index b9d674fd3b..280430c064 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -3208,7 +3208,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"));
@@ -3228,8 +3230,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
}