aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-17 11:34:28 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-17 17:42:02 +0200
commita86febf876f85d1b460463aa48ff8b319285f7ba (patch)
tree6b71d40e8fd3f378fb0d99ec56321fe1b55aeef4 /examples
parent83fb4f6743860bfb746e6243aad00513d498db4f (diff)
Fix GL_ constant usage in examples
Change-Id: Iecfa47845edb78928b388d150a3229f8c7a93d5d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc2
-rw-r--r--examples/quick/scenegraph/customgeometry/main.qml2
-rw-r--r--examples/quick/scenegraph/graph/gridnode.cpp2
-rw-r--r--examples/quick/scenegraph/graph/linenode.cpp6
4 files changed, 6 insertions, 6 deletions
diff --git a/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc b/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
index bd235e5dfb..68b041b3ca 100644
--- a/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
+++ b/examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
@@ -180,7 +180,7 @@
\quotefile scenegraph/customgeometry/customgeometry.pro
- As the bezier curve is drawn using GL_LINE_STRIP, we specify that
+ As the bezier curve is drawn as line strips, we specify that
the view should be multisampled to get antialiasing. This is not
required, but it will make the item look a bit nicer on hardware
that supports it. Multisampling is not enabled by default because
diff --git a/examples/quick/scenegraph/customgeometry/main.qml b/examples/quick/scenegraph/customgeometry/main.qml
index fd984520f2..6158b6554f 100644
--- a/examples/quick/scenegraph/customgeometry/main.qml
+++ b/examples/quick/scenegraph/customgeometry/main.qml
@@ -79,7 +79,7 @@ Item {
width: parent.width - 40
wrapMode: Text.WordWrap
- text: "This curve is a custom scene graph item, implemented using GL_LINE_STRIP"
+ text: "This curve is a custom scene graph item, implemented using line strips"
}
}
//! [4]
diff --git a/examples/quick/scenegraph/graph/gridnode.cpp b/examples/quick/scenegraph/graph/gridnode.cpp
index f2b4ca3cf8..3597247cd4 100644
--- a/examples/quick/scenegraph/graph/gridnode.cpp
+++ b/examples/quick/scenegraph/graph/gridnode.cpp
@@ -58,7 +58,7 @@ GridNode::GridNode()
: m_geometry(QSGGeometry::defaultAttributes_Point2D(), 0)
{
setGeometry(&m_geometry);
- m_geometry.setDrawingMode(GL_LINES);
+ m_geometry.setDrawingMode(QSGGeometry::DrawLines);
setMaterial(&m_material);
m_material.setColor(Qt::gray);
diff --git a/examples/quick/scenegraph/graph/linenode.cpp b/examples/quick/scenegraph/graph/linenode.cpp
index d63d8112e1..74161c8040 100644
--- a/examples/quick/scenegraph/graph/linenode.cpp
+++ b/examples/quick/scenegraph/graph/linenode.cpp
@@ -144,8 +144,8 @@ struct LineVertex {
static const QSGGeometry::AttributeSet &attributes()
{
static QSGGeometry::Attribute attr[] = {
- QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true),
- QSGGeometry::Attribute::create(1, 1, GL_FLOAT)
+ QSGGeometry::Attribute::create(0, 2, QSGGeometry::FloatType, true),
+ QSGGeometry::Attribute::create(1, 1, QSGGeometry::FloatType)
};
static QSGGeometry::AttributeSet set = { 2, 3 * sizeof(float), attr };
return set;
@@ -155,7 +155,7 @@ LineNode::LineNode(float size, float spread, const QColor &color)
: m_geometry(attributes(), 0)
{
setGeometry(&m_geometry);
- m_geometry.setDrawingMode(GL_TRIANGLE_STRIP);
+ m_geometry.setDrawingMode(QSGGeometry::DrawTriangleStrip);
LineMaterial *m = new LineMaterial;
m->state.color = color;