summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2016-06-23 20:21:14 +0200
committerAndy Nichols <andy.nichols@qt.io>2016-06-24 13:42:27 +0000
commit17ab3e355ee6c16099139d601960b4212840e44c (patch)
treefe9c78517b93bb625d73164d5fd33b0d98c558da /src
parent05abf629c9e55c786a909ac9f729a8c3784e95a4 (diff)
downloadqtlocation-17ab3e355ee6c16099139d601960b4212840e44c.tar.gz
Enable building with QT_NO_OPENGL defined by using QSGGeometry Enums
Rather than use OpenGL Enums directly in the code, now it is possible to use graphics system agnostic defines for building geometry for when the OpenGL headers are not available. QtLocation has been ported to use these new Enums. Change-Id: Ica6793e33cb7df1c9568681e478974aa9fefe156 Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/location/qdeclarativepolygonmapitem.cpp2
-rw-r--r--src/imports/location/qdeclarativepolylinemapitem.cpp2
-rw-r--r--src/imports/location/qgeomapitemgeometry.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/location/qdeclarativepolygonmapitem.cpp b/src/imports/location/qdeclarativepolygonmapitem.cpp
index 6fdef816..5353d3ab 100644
--- a/src/imports/location/qdeclarativepolygonmapitem.cpp
+++ b/src/imports/location/qdeclarativepolygonmapitem.cpp
@@ -653,7 +653,7 @@ MapPolygonNode::MapPolygonNode() :
geometry_(QSGGeometry::defaultAttributes_Point2D(), 0),
blocked_(true)
{
- geometry_.setDrawingMode(GL_TRIANGLES);
+ geometry_.setDrawingMode(QSGGeometry::DrawTriangles);
QSGGeometryNode::setMaterial(&fill_material_);
QSGGeometryNode::setGeometry(&geometry_);
diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp
index f2373abf..de3cb643 100644
--- a/src/imports/location/qdeclarativepolylinemapitem.cpp
+++ b/src/imports/location/qdeclarativepolylinemapitem.cpp
@@ -868,7 +868,7 @@ MapPolylineNode::MapPolylineNode() :
geometry_(QSGGeometry::defaultAttributes_Point2D(),0),
blocked_(true)
{
- geometry_.setDrawingMode(GL_TRIANGLE_STRIP);
+ geometry_.setDrawingMode(QSGGeometry::DrawTriangleStrip);
QSGGeometryNode::setMaterial(&fill_material_);
QSGGeometryNode::setGeometry(&geometry_);
}
diff --git a/src/imports/location/qgeomapitemgeometry.cpp b/src/imports/location/qgeomapitemgeometry.cpp
index e9c490d5..513feb2a 100644
--- a/src/imports/location/qgeomapitemgeometry.cpp
+++ b/src/imports/location/qgeomapitemgeometry.cpp
@@ -70,11 +70,11 @@ void QGeoMapItemGeometry::allocateAndFill(QSGGeometry *geom) const
if (isIndexed()) {
geom->allocate(vx.size(), ix.size());
- if (geom->indexType() == GL_UNSIGNED_SHORT) {
+ if (geom->indexType() == QSGGeometry::TypeUnsignedShort) {
quint16 *its = geom->indexDataAsUShort();
for (int i = 0; i < ix.size(); ++i)
its[i] = ix[i];
- } else if (geom->indexType() == GL_UNSIGNED_INT) {
+ } else if (geom->indexType() == QSGGeometry::TypeUnsignedInt) {
quint32 *its = geom->indexDataAsUInt();
for (int i = 0; i < ix.size(); ++i)
its[i] = ix[i];