summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index bf77eda..7abf4bc 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2782,8 +2782,8 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
if (!eng->isNativePaintingActive()) {
QRectF src(0, 0, target.width(), target.height());
QSize size(target.width(), target.height());
- eng->drawTexture(target, textureId, size, src);
- return;
+ if (eng->drawTexture(target, textureId, size, src))
+ return;
}
}
@@ -2858,8 +2858,8 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text
QRectF dest(point, QSizeF(textureWidth, textureHeight));
QRectF src(0, 0, textureWidth, textureHeight);
QSize size(textureWidth, textureHeight);
- eng->drawTexture(dest, textureId, size, src);
- return;
+ if (eng->drawTexture(dest, textureId, size, src))
+ return;
}
}
@@ -5169,11 +5169,17 @@ Q_OPENGL_EXPORT void qt_set_gl_library_name(const QString& name)
Q_OPENGL_EXPORT const QString qt_gl_library_name()
{
if (qt_gl_lib_name()->isNull()) {
-#if defined(Q_WS_X11) || defined(Q_WS_QWS)
- return QLatin1String("GL");
-#else // Q_WS_MAC
+#ifdef Q_WS_MAC
return QLatin1String("/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib");
-#endif
+#else
+# if defined(QT_OPENGL_ES_1)
+ return QLatin1String("GLES_CM");
+# elif defined(QT_OPENGL_ES_2)
+ return QLatin1String("GLESv2");
+# else
+ return QLatin1String("GL");
+# endif
+#endif // defined Q_WS_MAC
}
return *qt_gl_lib_name();
}