From ffa494f9209b0394d7a4f3c66ee2f19cc12114a6 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Sun, 1 Sep 2024 16:37:49 +0800 Subject: [PATCH] feat: enable wgl in wasm demo. --- demo/Ursa.Demo.Browser/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/demo/Ursa.Demo.Browser/Program.cs b/demo/Ursa.Demo.Browser/Program.cs index 5c9ef40e..7bb55685 100644 --- a/demo/Ursa.Demo.Browser/Program.cs +++ b/demo/Ursa.Demo.Browser/Program.cs @@ -11,7 +11,10 @@ internal sealed partial class Program { private static Task Main(string[] args) => BuildAvaloniaApp() .WithSourceHanSansCNFont() - .StartBrowserAppAsync("out"); + .StartBrowserAppAsync("out", new BrowserPlatformOptions() + { + RenderingMode = [ BrowserRenderingMode.WebGL2, BrowserRenderingMode.WebGL1, BrowserRenderingMode.Software2D ] + }); public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure();