Include OpenGL version string in sysinfo.

This commit is contained in:
Paul Chote
2016-03-02 19:35:58 +00:00
committed by Oliver Brakmann
parent 6b4ccecabe
commit bc0efbefd1
6 changed files with 17 additions and 3 deletions

View File

@@ -33,6 +33,8 @@ namespace OpenRA.Platforms.Default
public static GLFeatures Features { get; private set; }
public static string Version { get; private set; }
public const int GL_FALSE = 0;
// ClearBufferMask
@@ -452,8 +454,8 @@ namespace OpenRA.Platforms.Default
{
try
{
var versionString = glGetString(GL_VERSION);
var version = versionString.Contains(" ") ? versionString.Split(' ')[0].Split('.') : versionString.Split('.');
Version = glGetString(GL_VERSION);
var version = Version.Contains(" ") ? Version.Split(' ')[0].Split('.') : Version.Split('.');
var major = 0;
if (version.Length > 0)

View File

@@ -395,5 +395,7 @@ namespace OpenRA.Platforms.Default
VerifyThreadAffinity();
return new Shader(name);
}
public string GLVersion { get { return OpenGL.Version; } }
}
}