diff --git a/util/glgen/specparser.cpp b/util/glgen/specparser.cpp index 514a700644..91a906bca9 100644 --- a/util/glgen/specparser.cpp +++ b/util/glgen/specparser.cpp @@ -253,7 +253,7 @@ void SpecParser::parseFunctions(QTextStream &stream) // Extract the OpenGL version in which this function was deprecated. // If it is OpenGL 3.1 then it must be a compatibility profile function QString deprecatedVersion = deprecatedRegExp.cap(1).simplified(); - if (deprecatedVersion == QStringLiteral("3.1")) + if (deprecatedVersion == QStringLiteral("3.1") && !inDeprecationException(currentFunction.name)) currentVersionProfile.profile = VersionProfile::CompatibilityProfile; } else if (categoryRegExp.indexIn(line) != -1) { @@ -305,3 +305,8 @@ void SpecParser::parseFunctions(QTextStream &stream) m_versions = versions.toList(); qSort(m_versions); } + +bool SpecParser::inDeprecationException(const QString &functionName) const +{ + return (functionName == QStringLiteral("TexImage3D")); +} diff --git a/util/glgen/specparser.h b/util/glgen/specparser.h index e455f6579c..19357841ca 100644 --- a/util/glgen/specparser.h +++ b/util/glgen/specparser.h @@ -192,6 +192,7 @@ protected: bool parseTypeMap(); void parseEnums(); void parseFunctions(QTextStream &stream); + bool inDeprecationException(const QString &functionName) const; private: QString m_specFileName;