Hide legacy GL support behind a feature flag.
This commit is contained in:
@@ -26,7 +26,7 @@ namespace OpenRA
|
||||
|
||||
public interface IPlatform
|
||||
{
|
||||
IPlatformWindow CreateWindow(Size size, WindowMode windowMode, float scaleModifier, int batchSize, int videoDisplay, GLProfile profile);
|
||||
IPlatformWindow CreateWindow(Size size, WindowMode windowMode, float scaleModifier, int batchSize, int videoDisplay, GLProfile profile, bool enableLegacyGL);
|
||||
ISoundEngine CreateSound(string device);
|
||||
IFont CreateFont(byte[] data);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace OpenRA
|
||||
|
||||
Window = platform.CreateWindow(new Size(resolution.Width, resolution.Height),
|
||||
graphicSettings.Mode, graphicSettings.UIScale, graphicSettings.BatchSize,
|
||||
graphicSettings.VideoDisplay, graphicSettings.GLProfile);
|
||||
graphicSettings.VideoDisplay, graphicSettings.GLProfile, !graphicSettings.DisableLegacyGL);
|
||||
|
||||
Context = Window.Context;
|
||||
|
||||
|
||||
@@ -175,13 +175,16 @@ namespace OpenRA
|
||||
[Desc("Disable operating-system provided cursor rendering.")]
|
||||
public bool DisableHardwareCursors = false;
|
||||
|
||||
[Desc("Disable legacy OpenGL 2.1 support.")]
|
||||
public bool DisableLegacyGL = true;
|
||||
|
||||
[Desc("Display index to use in a multi-monitor fullscreen setup.")]
|
||||
public int VideoDisplay = 0;
|
||||
|
||||
[Desc("Preferred OpenGL profile to use.",
|
||||
"Modern: OpenGL Core Profile 3.2 or greater.",
|
||||
"Embedded: OpenGL ES 3.0 or greater.",
|
||||
"Legacy: OpenGL 2.1 with framebuffer_object extension.",
|
||||
"Legacy: OpenGL 2.1 with framebuffer_object extension (requires DisableLegacyGL: False)",
|
||||
"Automatic: Use the first supported profile.")]
|
||||
public GLProfile GLProfile = GLProfile.Automatic;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user