Add Graphics.DisableGLDebugMessageCallback setting.

This commit is contained in:
Paul Chote
2020-01-22 20:51:44 +00:00
committed by abcdefg30
parent 46384d25f2
commit b08f9886be
2 changed files with 7 additions and 0 deletions

View File

@@ -171,6 +171,9 @@ namespace OpenRA
[Desc("Disable separate OpenGL render thread on Windows operating systems.")]
public bool DisableWindowsRenderThread = true;
[Desc("Disable the OpenGL debug message callback feature.")]
public bool DisableGLDebugMessageCallback = false;
[Desc("Use OpenGL ES if both ES and regular OpenGL are available.")]
public bool PreferGLES = false;

View File

@@ -497,6 +497,10 @@ namespace OpenRA.Platforms.Default
DetectGLFeatures();
// Allow users to force-disable the debug message callback feature to work around driver bugs
if (Features.HasFlag(GLFeatures.DebugMessagesCallback) && Game.Settings.Graphics.DisableGLDebugMessageCallback)
Features ^= GLFeatures.DebugMessagesCallback;
if (!Features.HasFlag(GLFeatures.Core))
{
WriteGraphicsLog("Unsupported OpenGL version: " + glGetString(GL_VERSION));