Move WriteGraphicsLog to OpenGL.

This commit is contained in:
Paul Chote
2015-12-28 10:57:43 +00:00
parent 4ec200b3a1
commit d96a32a89f
4 changed files with 26 additions and 26 deletions

View File

@@ -409,5 +409,27 @@ namespace OpenRA.Platforms.Default
{
return (T)(object)Marshal.GetDelegateForFunctionPointer(SDL.SDL_GL_GetProcAddress(name), typeof(T));
}
public static void WriteGraphicsLog(string message)
{
Log.Write("graphics", message);
Log.Write("graphics", "");
Log.Write("graphics", "OpenGL Information:");
var vendor = OpenGL.glGetString(OpenGL.GL_VENDOR);
Log.Write("graphics", "Vendor: {0}", vendor);
if (vendor.Contains("Microsoft"))
{
var msg = "";
msg += "Note: The default driver provided by Microsoft does not include full OpenGL support.\n";
msg += "Please install the latest drivers from your graphics card manufacturer's website.\n";
Log.Write("graphics", msg);
}
Log.Write("graphics", "Renderer: {0}", OpenGL.glGetString(OpenGL.GL_RENDERER));
Log.Write("graphics", "GL Version: {0}", OpenGL.glGetString(OpenGL.GL_VERSION));
Log.Write("graphics", "Shader Version: {0}", OpenGL.glGetString(OpenGL.GL_SHADING_LANGUAGE_VERSION));
Log.Write("graphics", "Available extensions:");
Log.Write("graphics", OpenGL.glGetString(OpenGL.GL_EXTENSIONS));
}
}
}