mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-19 20:18:34 +00:00
Added new vendors in extensions regex. Simplified GetGL2Extension implementation.
This commit is contained in:
parent
5c3d94aeef
commit
e0b5a512ab
|
@ -70,7 +70,7 @@ namespace Bind
|
||||||
{
|
{
|
||||||
public static readonly char[] Separators = { ' ', '\n', ',', '(', ')', ';', '#' };
|
public static readonly char[] Separators = { ' ', '\n', ',', '(', ')', ';', '#' };
|
||||||
public static readonly Regex Extensions = new Regex(
|
public static readonly Regex Extensions = new Regex(
|
||||||
"(ARB|EXT|ATI|NV|SUNX|SUN|SGIS|SGIX|SGI|MESA|3DFX|IBM|GREMEDY|HP|INTEL|PGI|INGR|APPLE|OML|I3D)",
|
"(ARB|EXT|ATIX|ATI|AMDX|AMD|NV|NVX|SUNX|SUN|SGIS|SGIX|SGI|MESAX|MESA|3DFX|IBM|GREMEDY|HP|INTEL|PGI|INGR|APPLE|OML|I3D|ARM|ANGLE|OES|QCOM)",
|
||||||
RegexOptions.Compiled);
|
RegexOptions.Compiled);
|
||||||
|
|
||||||
#region internal StreamReader OpenSpecFile(string file)
|
#region internal StreamReader OpenSpecFile(string file)
|
||||||
|
@ -202,30 +202,20 @@ namespace Bind
|
||||||
|
|
||||||
internal static string GetGL2Extension(string name)
|
internal static string GetGL2Extension(string name)
|
||||||
{
|
{
|
||||||
if (name.EndsWith("3DFX")) { return "3dfx"; }
|
var match = Extensions.Match(name);
|
||||||
if (name.EndsWith("APPLE")) { return "Apple"; }
|
if (match.Success)
|
||||||
if (name.EndsWith("ARB")) { return "Arb"; }
|
{
|
||||||
if (name.EndsWith("AMD")) { return "Amd"; }
|
string ext = match.Value;
|
||||||
if (name.EndsWith("ATI")) { return "Ati"; }
|
if (ext.Length > 2)
|
||||||
if (name.EndsWith("ATIX")) { return "Atix"; }
|
{
|
||||||
if (name.EndsWith("EXT")) { return "Ext"; }
|
ext = ext[0] + ext.Substring(1).ToLower();
|
||||||
if (name.EndsWith("GREMEDY")) { return "Gremedy"; }
|
}
|
||||||
if (name.EndsWith("HP")) { return "HP"; }
|
return ext;
|
||||||
if (name.EndsWith("I3D")) { return "I3d"; }
|
}
|
||||||
if (name.EndsWith("IBM")) { return "Ibm"; }
|
else
|
||||||
if (name.EndsWith("INGR")) { return "Ingr"; }
|
{
|
||||||
if (name.EndsWith("INTEL")) { return "Intel"; }
|
return String.Empty;
|
||||||
if (name.EndsWith("MESA")) { return "Mesa"; }
|
}
|
||||||
if (name.EndsWith("NV")) { return "NV"; }
|
|
||||||
if (name.EndsWith("OES")) { return "Oes"; }
|
|
||||||
if (name.EndsWith("OML")) { return "Oml"; }
|
|
||||||
if (name.EndsWith("PGI")) { return "Pgi"; }
|
|
||||||
if (name.EndsWith("SGI")) { return "Sgi"; }
|
|
||||||
if (name.EndsWith("SGIS")) { return "Sgis"; }
|
|
||||||
if (name.EndsWith("SGIX")) { return "Sgix"; }
|
|
||||||
if (name.EndsWith("SUN")) { return "Sun"; }
|
|
||||||
if (name.EndsWith("SUNX")) { return "Sunx"; }
|
|
||||||
return String.Empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue