简体   繁体   中英

WebGL IE in webbrowser control

I am testing the use of WebGL within an IE webbrowser control in a .NET Winforms application. I have installed IE11 preview and checked that that the webbrowser control reports version 11. If I run this page [ http://www.html5canvastutorials.com/three/html5-canvas-webgl-rotating-cube/] page in IE11 I see a rotating cube. In the winforms app, it complains of a script error.

I have tried this with several WebGL sites with similar results. Any ideas?

By default, the WinForms WebBrowser Control will render sites in IE7 Standards mode, which does not support WebGL. Make sure that your application has the appropriate registry keys set to make the default mode IE11 Edge Mode.

See the IE Blog post at http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx which describes the FEATURE_BROWSER_EMULATION feature control key, but keep in mind that this is in the context of IE8, so it doesn't include examples with IE11 Edge Mode. http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx#browser_emulation documents the latest values, including the one for IE11 Edge mode.

Disclosure: I am on the team that worked on Microsoft's implementation of WebGL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM