Last active
January 12, 2021 08:25
-
-
Save ayamflow/c8f41a493d459b2151b05eeca9a5b8d9 to your computer and use it in GitHub Desktop.
GPU infos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/31775686/is-there-a-way-to-know-anything-about-hardware-resources-of-platform-accessing/31896597#31896597 | |
// https://stackoverflow.com/questions/15464896/get-cpu-gpu-memory-information | |
var canvas = document.createElement('canvas') | |
var gl = canvas.getContext('experimental-webgl'); | |
var params = [gl.RENDERER, gl.VENDOR, gl.VERSION, gl.SHADING_LANGUAGE_VERSION]; | |
var infos = gl.getExtension('WEBGL_debug_renderer_info'); | |
params.push(infos.UNMASKED_RENDERER_WEBGL, infos.UNMASKED_VENDOR_WEBGL); | |
params.forEach(function(param) { | |
console.log(gl.getParameter(param)) | |
}); | |
var extensions = gl.getSupportedExtensions(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment