函数运行库
(function () {
var canvas, gl, glVendor, glRenderer;
function getCanvas() {
if (canvas == null) {
canvas = document.createElement('canvas');
}
return canvas;
}
function getGl() {
if (gl == null) {
gl = getCanvas().getContext('experimental-webgl');
}
return gl;
}
function getGlVendor() {
if (glVendor == null) {
debugInfo = getGl().getExtension('WEBGL_debug_renderer_info');
glVendor = debugInfo == null ? 'unknown' : getGl().getParameter(debugInfo.UNMASKED_VENDOR_WEBGL);
}
return glVendor;
}
function getGlRenderer() {
if (glRenderer == null) {
debugInfo = getGl().getExtension('WEBGL_debug_renderer_info');
glRenderer = debugInfo == null ? 'unknown' : getGl().getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
}
return glRenderer;
}
if (window.MobileDevice == undefined) {
window.MobileDevice = {};
}
window.MobileDevice.getGlVendor = getGlVendor;
window.MobileDevice.getGlRenderer = getGlRenderer;
}
)
();
获取提供商
document.write(MobileDevice.getGlVendor());
获取渲染器
document.write(MobileDevice.getGlRenderer());
友情提示:本站所有文章,如无特殊说明或标注,均为何星星原创发布。与此同时,趋于近年来本站的文章内容频繁被他站盗用与机器采集,现已全局禁用网站文字内容操作,了解详情或转载文章请 点此 继续!
0 条评论