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>
This commit is contained in:
Sean Harmer 2013-04-04 10:36:42 +01:00 committed by The Qt Project
parent f46787b48a
commit 13a3e08c25
2 changed files with 7 additions and 1 deletions

View File

@ -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"));
}

View File

@ -192,6 +192,7 @@ protected:
bool parseTypeMap();
void parseEnums();
void parseFunctions(QTextStream &stream);
bool inDeprecationException(const QString &functionName) const;
private:
QString m_specFileName;