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

@@ -78,6 +78,8 @@ namespace OpenRA
IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot);
void SetHardwareCursor(IHardwareCursor cursor);
string GLVersion { get; }
}
public interface IVertexBuffer<T> : IDisposable

View File

@@ -273,5 +273,10 @@ namespace OpenRA
{
return Device.SetClipboardText(text);
}
public string GLVersion
{
get { return Device.GLVersion; }
}
}
}

View File

@@ -257,11 +257,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (!Game.Settings.Debug.SendSystemInformation)
return null;
return "?id={0}&platform={1}&os={2}&runtime={3}&lang={4}&version={5}&mod={6}&modversion={7}".F(
return "?id={0}&platform={1}&os={2}&runtime={3}&gl={4}&lang={5}&version={6}&mod={7}&modversion={8}".F(
Uri.EscapeUriString(Game.Settings.Debug.UUID),
Uri.EscapeUriString(Platform.CurrentPlatform.ToString()),
Uri.EscapeUriString(Environment.OSVersion.ToString()),
Uri.EscapeUriString(Platform.RuntimeVersion),
Uri.EscapeUriString(Game.Renderer.GLVersion),
Uri.EscapeUriString(System.Globalization.CultureInfo.InstalledUICulture.TwoLetterISOLanguageName),
Uri.EscapeUriString(ModMetadata.AllMods["modchooser"].Version),
Uri.EscapeUriString(Game.ModData.Manifest.Mod.Id),

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; } }
}
}

View File

@@ -60,6 +60,8 @@ namespace OpenRA.Platforms.Null
public IHardwareCursor CreateHardwareCursor(string name, Size size, byte[] data, int2 hotspot) { return null; }
public void SetHardwareCursor(IHardwareCursor cursor) { }
public string GLVersion { get { return "(null)"; } }
}
public class NullShader : IShader