本文整理汇总了C#中WebGLRenderingContext.Orphanize方法的典型用法代码示例。如果您正苦于以下问题:C# WebGLRenderingContext.Orphanize方法的具体用法?C# WebGLRenderingContext.Orphanize怎么用?C# WebGLRenderingContext.Orphanize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebGLRenderingContext
的用法示例。
在下文中一共展示了WebGLRenderingContext.Orphanize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application
//.........这里部分代码省略.........
new IHTMLPre {
// https://code.google.com/p/chromium/issues/detail?id=294207
"Rats! WebGL hit a snag. \n WebGL: Unavailable.\n GPU process was unable to boot. \n restart chrome.",
// chrome sends us to about:blank?
//new IHTMLAnchor {
// target = "_blank",
// href = "about:gpu", innerText = "about:gpu",
// // http://tirania.org/blog/archive/2009/Jul-27-1.html
// //onclick += de
//}
//.With(a => { a.onclick += e => { e.preventDefault(); Native.window.open("about:gpu"); }; } )
}.AttachToDocument();
return;
}
#endregion
var c = gl.canvas.AttachToDocument();
#region oncontextlost
gl.oncontextlost +=
e =>
{
//[12144:10496:0311 / 120850:ERROR: gpu_watchdog_thread.cc(314)] : The GPU process hung. Terminating after 10000 ms.
// GpuProcessHostUIShim: The GPU process crashed!
gl.canvas.Orphanize();
new IHTMLPre {
// https://code.google.com/p/chromium/issues/detail?id=294207
@"Rats! WebGL hit a snag.
oncontextlost.
The GPU process hung. Terminating.
check chrome://gpu for log messages.
do we have a stack trace?
" + new { e.statusMessage } ,
// chrome sends us to about:blank?
//new IHTMLAnchor {
// target = "_blank",
// href = "about:gpu", innerText = "about:gpu",
// // http://tirania.org/blog/archive/2009/Jul-27-1.html
// //onclick += de
//}
//.With(a => { a.onclick += e => { e.preventDefault(); Native.window.open("about:gpu"); }; } )
}.AttachToDocument();
};
#endregion
#region onresize
new { }.With(
async delegate