aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-04-25 12:09:08 +0200
committerAndy Nichols <andy.nichols@qt.io>2016-05-06 19:17:20 +0000
commit53c5398529f852903fb6774210573a25f5ea144a (patch)
tree211365b42b91087ba6e8dee80d532fb01ac03889 /examples
parent3fdaa13f7f0a4f0eeff2e7450df2df0df824b72a (diff)
Fix building with QT_NO_OPENGL defined
Change-Id: Ice6c47f766899e7313b9dde8cfcd6d81eeaf52f5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/quick.pro8
-rw-r--r--examples/quick/scenegraph/customgeometry/beziercurve.cpp2
-rw-r--r--examples/quick/scenegraph/scenegraph.pro19
3 files changed, 19 insertions, 10 deletions
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro
index e66e24882e..5fd7731739 100644
--- a/examples/quick/quick.pro
+++ b/examples/quick/quick.pro
@@ -24,8 +24,12 @@ SUBDIRS = quick-accessibility \
imageresponseprovider \
window \
particles \
- demos \
- rendercontrol
+ demos
+
+#OpenGL Support Required
+contains(QT_CONFIG, opengl(es1|es2)?) {
+ SUBDIRS += rendercontrol
+}
# Widget dependent examples
qtHaveModule(widgets) {
diff --git a/examples/quick/scenegraph/customgeometry/beziercurve.cpp b/examples/quick/scenegraph/customgeometry/beziercurve.cpp
index 14e78f8d21..ca3c6f524b 100644
--- a/examples/quick/scenegraph/customgeometry/beziercurve.cpp
+++ b/examples/quick/scenegraph/customgeometry/beziercurve.cpp
@@ -135,7 +135,7 @@ QSGNode *BezierCurve::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
//! [4] //! [5]
geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), m_segmentCount);
geometry->setLineWidth(2);
- geometry->setDrawingMode(GL_LINE_STRIP);
+ geometry->setDrawingMode(QSGGeometry::DrawLineStrip);
node->setGeometry(geometry);
node->setFlag(QSGNode::OwnsGeometry);
//! [5] //! [6]
diff --git a/examples/quick/scenegraph/scenegraph.pro b/examples/quick/scenegraph/scenegraph.pro
index 1e7e74372d..0162aae45d 100644
--- a/examples/quick/scenegraph/scenegraph.pro
+++ b/examples/quick/scenegraph/scenegraph.pro
@@ -1,10 +1,15 @@
TEMPLATE = subdirs
+
+contains(QT_CONFIG, opengl(es1|es2)?) {
+ SUBDIRS += \
+ simplematerial \
+ sgengine \
+ textureinsgnode \
+ openglunderqml \
+ textureinthread \
+ twotextureproviders
+}
+
SUBDIRS += \
customgeometry \
- openglunderqml \
- sgengine \
- simplematerial \
- textureinsgnode \
- textureinthread \
- threadedanimation \
- twotextureproviders
+ threadedanimation