Skip to content

Commit

Permalink
Special case to work around upstream bug in gl.spec
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Samuel Rødal <[email protected]>
  • Loading branch information
seanharmer authored and The Qt Project committed Apr 4, 2013
1 parent f46787b commit 13a3e08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion util/glgen/specparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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"));
}
1 change: 1 addition & 0 deletions util/glgen/specparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class SpecParser
bool parseTypeMap();
void parseEnums();
void parseFunctions(QTextStream &stream);
bool inDeprecationException(const QString &functionName) const;

private:
QString m_specFileName;
Expand Down

0 comments on commit 13a3e08

Please sign in to comment.