summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/opengl/threadedqopenglwidget/main.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/examples/opengl/threadedqopenglwidget/main.cpp b/examples/opengl/threadedqopenglwidget/main.cpp
index 2c94469b7c..66ee4c2f7f 100644
--- a/examples/opengl/threadedqopenglwidget/main.cpp
+++ b/examples/opengl/threadedqopenglwidget/main.cpp
@@ -75,26 +75,31 @@ int main( int argc, char ** argv )
+ QLatin1Char('/') + getGlString(topLevelGlWidget.context()->functions(), GL_RENDERER);
const bool supportsThreading = !glInfo.contains(QLatin1String("nouveau"), Qt::CaseInsensitive)
- && !glInfo.contains(QLatin1String("ANGLE"), Qt::CaseInsensitive);
+ && !glInfo.contains(QLatin1String("ANGLE"), Qt::CaseInsensitive)
+ && !glInfo.contains(QLatin1String("llvmpipe"), Qt::CaseInsensitive);
const QString toolTip = supportsThreading ? glInfo : glInfo + QStringLiteral("\ndoes not support threaded OpenGL.");
topLevelGlWidget.setToolTip(toolTip);
QScopedPointer<MainWindow> mw1;
QScopedPointer<MainWindow> mw2;
- if (supportsThreading && !QApplication::arguments().contains(QStringLiteral("--single"))) {
- pos += QPoint(100, 100);
- mw1.reset(new MainWindow);
- mw1->setToolTip(toolTip);
- mw1->move(pos);
- mw1->setWindowTitle(QStringLiteral("Threaded QOpenGLWidget example #1"));
- mw1->show();
- pos += QPoint(100, 100);
- mw2.reset(new MainWindow);
- mw2->setToolTip(toolTip);
- mw2->move(pos);
- mw2->setWindowTitle(QStringLiteral("Threaded QOpenGLWidget example #2"));
- mw2->show();
+ if (!QApplication::arguments().contains(QStringLiteral("--single"))) {
+ if (supportsThreading) {
+ pos += QPoint(100, 100);
+ mw1.reset(new MainWindow);
+ mw1->setToolTip(toolTip);
+ mw1->move(pos);
+ mw1->setWindowTitle(QStringLiteral("Threaded QOpenGLWidget example #1"));
+ mw1->show();
+ pos += QPoint(100, 100);
+ mw2.reset(new MainWindow);
+ mw2->setToolTip(toolTip);
+ mw2->move(pos);
+ mw2->setWindowTitle(QStringLiteral("Threaded QOpenGLWidget example #2"));
+ mw2->show();
+ } else {
+ qWarning() << toolTip;
+ }
}
return a.exec();