1
0
Fork 0

Fix FGQCanvas compilation with Qt 5.7

Use raw OpenGL type constants instead of the QSG aliases which were
only added in 5.8
This commit is contained in:
James Turner 2017-11-19 21:57:14 +01:00
parent 94a8ba8f9b
commit 089abcfe40

View file

@ -76,11 +76,11 @@ public:
QTransform transform; QTransform transform;
QTriangleSet triangles = qTriangulate(m_path, transform); QTriangleSet triangles = qTriangulate(m_path, transform);
int indexType = QSGGeometry::UnsignedShortType; int indexType = GL_UNSIGNED_SHORT;
if (triangles.indices.type() == QVertexIndexVector::UnsignedShort) { if (triangles.indices.type() == QVertexIndexVector::UnsignedShort) {
// default is fine // default is fine
} else if (triangles.indices.type() == QVertexIndexVector::UnsignedInt) { } else if (triangles.indices.type() == QVertexIndexVector::UnsignedInt) {
indexType = QSGGeometry::UnsignedIntType; indexType = GL_UNSIGNED_INT;
} else { } else {
qFatal("Unsupported triangle index type"); qFatal("Unsupported triangle index type");
} }