From b7e69aaf10b3479674595196e08c3a314d2d49e1 Mon Sep 17 00:00:00 2001 From: adfriz <76892624+adfriz@users.noreply.github.com> Date: Tue, 25 Aug 2026 14:07:15 +0700 Subject: [PATCH] Change: Request minimum OpenGL 4.1 context in OpenBVE, Route Viewer and Object Viewer --- source/ObjectViewer/System/GameWindow.cs | 2 +- source/OpenBVE/System/GameWindow.cs | 2 +- source/RouteViewer/System/Gamewindow.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ObjectViewer/System/GameWindow.cs b/source/ObjectViewer/System/GameWindow.cs index 59e58e97e..a805b6e3e 100644 --- a/source/ObjectViewer/System/GameWindow.cs +++ b/source/ObjectViewer/System/GameWindow.cs @@ -14,7 +14,7 @@ internal class ObjectViewer : GameWindow { //Deliberately specify the default constructor with various overrides public ObjectViewer(int width, int height, GraphicsMode currentGraphicsMode, string windowTitle, - GameWindowFlags @default) : base(width, height, currentGraphicsMode, windowTitle, @default) + GameWindowFlags @default) : base(width, height, currentGraphicsMode, windowTitle, @default, DisplayDevice.Default, 4, 1, GraphicsContextFlags.ForwardCompatible) { try { diff --git a/source/OpenBVE/System/GameWindow.cs b/source/OpenBVE/System/GameWindow.cs index 11cd515a8..87213dab7 100644 --- a/source/OpenBVE/System/GameWindow.cs +++ b/source/OpenBVE/System/GameWindow.cs @@ -70,7 +70,7 @@ public OpenBVEGame(int width, int height, GraphicsMode currentGraphicsMode, Game } } - public OpenBVEGame(int width, int height, GraphicsMode currentGraphicsMode, GameWindowFlags @default, GraphicsContextFlags flags): base(width, height, currentGraphicsMode, Translations.GetInterfaceString(HostApplication.OpenBve, new[] {"program","title"}), @default, DisplayDevice.Default, 3,3, flags) + public OpenBVEGame(int width, int height, GraphicsMode currentGraphicsMode, GameWindowFlags @default, GraphicsContextFlags flags): base(width, height, currentGraphicsMode, Translations.GetInterfaceString(HostApplication.OpenBve, new[] {"program","title"}), @default, DisplayDevice.Default, 4,1, flags) { Program.FileSystem.AppendToLogFile("Creating game window with forwards-compatible context."); if (Program.CurrentHost.Platform == HostPlatform.AppleOSX && IntPtr.Size != 4) diff --git a/source/RouteViewer/System/Gamewindow.cs b/source/RouteViewer/System/Gamewindow.cs index 81473826f..24da8d288 100644 --- a/source/RouteViewer/System/Gamewindow.cs +++ b/source/RouteViewer/System/Gamewindow.cs @@ -16,7 +16,7 @@ namespace RouteViewer internal class RouteViewer : GameWindow { //Deliberately specify the default constructor with various overrides - public RouteViewer(int width, int height, GraphicsMode currentGraphicsMode, string windowTitle, GameWindowFlags @default): base (width, height, currentGraphicsMode, windowTitle, @default) + public RouteViewer(int width, int height, GraphicsMode currentGraphicsMode, string windowTitle, GameWindowFlags @default): base (width, height, currentGraphicsMode, windowTitle, @default, DisplayDevice.Default, 4, 1, GraphicsContextFlags.ForwardCompatible) { try {