Don't try to load opengl extensions or functions without QLibrary
Change-Id: If77ca6e04c83d94fd3063b68963b1bcd90980d99 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
8b81f89dff
commit
53b83ac413
@ -78,8 +78,9 @@ public:
|
||||
private:
|
||||
bool init();
|
||||
QFunctionPointer resolve(const char *name);
|
||||
|
||||
#ifndef QT_NO_LIBRARY
|
||||
QLibrary m_gl;
|
||||
#endif
|
||||
};
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLExtensions : public QOpenGLFunctions
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user