diff --git a/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs b/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs index 11dd3a7..680c818 100644 --- a/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs +++ b/src/DotRecast.Recast.Demo/Draw/ModernOpenGLDraw.cs @@ -76,7 +76,7 @@ public class ModernOpenGLDraw : OpenGLDraw public unsafe void init() { - string SHADER_VERSION = "#version 400\n"; + string SHADER_VERSION = PlatformID.MacOSX == Environment.OSVersion.Platform ? "#version 400\n" : "#version 460\n"; string vertex_shader = SHADER_VERSION + "uniform mat4 ProjMtx;\n" // + "uniform mat4 ViewMtx;\n" // + "in vec3 Position;\n" // diff --git a/src/DotRecast.Recast.Demo/RecastDemo.cs b/src/DotRecast.Recast.Demo/RecastDemo.cs index ff352f6..a73f679 100644 --- a/src/DotRecast.Recast.Demo/RecastDemo.cs +++ b/src/DotRecast.Recast.Demo/RecastDemo.cs @@ -19,10 +19,8 @@ freely, subject to the following restrictions: */ using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; -using System.Diagnostics; using System.IO; using System.Linq; using System.Numerics; @@ -270,6 +268,7 @@ public class RecastDemo options.Position = new Vector2D((resolution.X - width) / 2, (resolution.Y - height) / 2); options.VSync = false; options.ShouldSwapAutomatically = false; + options.PreferredDepthBufferBits = 24; window = Window.Create(options); if (window == null)