This code will print GPU infos an will list all info you can have with the performance object of this browser (there is no standard for the BOM so it changes for each browser).
<html>
<body>
<canvas id="glcanvas" width="0" height="0"></canvas>
<script>
var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
document.write("<br>");
for (var value in performance) {
document.write(value + "<br>");
}
document.write("<br><br><br>");
var canvas;
canvas = document.getElementById("glcanvas");
var gl = canvas.getContext("experimental-webgl");
document.write(gl.getParameter(gl.RENDERER) + "<br>");
document.write(gl.getParameter(gl.VENDOR) + "<br>");
document.write(getUnmaskedInfo(gl).vendor + "<br>");
document.write(getUnmaskedInfo(gl).renderer + "<br>");
function getUnmaskedInfo(gl) {
var unMaskedInfo = {
renderer: '',
vendor: ''
};
var dbgRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
if (dbgRenderInfo != null) {
unMaskedInfo.renderer = gl.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL);
unMaskedInfo.vendor = gl.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL);
}
return unMaskedInfo;
}
</script>
</body>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…