如何在 UWP 上的 Xamarin.Forms WebView 中启用 WebGL? [英] How do I enable WebGL in Xamarin.Forms WebView on UWP?

查看:31
本文介绍了如何在 UWP 上的 Xamarin.Forms WebView 中启用 WebGL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Xamarin.Forms 的新手,并尝试在装有 UWP 的 Windows 10 x64 v1803 机器上使用 WebView,但我不知道如何让它与 WebGL 配合使用.

I’m new to Xamarin.Forms and tried using WebView on my Windows 10 x64 v1803 machine with UWP but I can’t see how to get it to work with WebGL.

使用 WebGL 的网站要么显示一条消息您的显卡不支持 WebGL,要么根本不显示图形内容.

Sites which use WebGL either display a message that "Your video card does not support WebGL or just don’t display and graphical content at all.

这是 UWP 还是 WebView 本身的限制?

Is this a limitation of UWP or WebView itself?

是否是 WebView 配置问题?

Is it a WebView configuration issue?

WebGL 适用于本机上的所有其他浏览器.

WebGL works in all other browsers on this machine.

推荐答案

UWP WebView 控件支持 WebGL.有类似的 问题案例 在 msdn 中,您可以参考.请尝试使用SeparateProcess模式的WebView替换默认的.

UWP WebView control is support WebGL. There is similar issue case in msdn you could refer. Please try to use SeparateProcess mode WebView to replace the default one.

public MainPage()
{
    this.InitializeComponent();
    var MyWebView = new WebView(WebViewExecutionMode.SeparateProcess);
    MyWebView.Source = new Uri("http://cycleblob.com/");
    this.RootGrid.Children.Add(MyWebView);
}

这篇关于如何在 UWP 上的 Xamarin.Forms WebView 中启用 WebGL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆