diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2013-04-04 10:36:42 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 00:14:45 +0200 |
commit | 13a3e08c25a79520abdf4852e6e5e0b2122b78b7 (patch) | |
tree | 01638b27fce5ea98bd9349e5a9bbaf51eb97420b /util/glgen | |
parent | f46787b48a4452cc19ed4201cfc8cac7b7cddcfe (diff) |
Special case to work around upstream bug in gl.spec
This commit fixes glTexImage3D to be non-deprecated. This function is
incorrectly marked as deprecated in gl.spec. For more info see
https://www.khronos.org/bugzilla/show_bug.cgi?id=449
Change-Id: Ic9021b184a10d1b162158a3476b7272f4c6917fd
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'util/glgen')
-rw-r--r-- | util/glgen/specparser.cpp | 7 | ||||
-rw-r--r-- | util/glgen/specparser.h | 1 |
2 files changed, 7 insertions, 1 deletions
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; |