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
function test(count = 100) { | |
const gl = document.createElement('canvas').getContext('webgl'); | |
function compileShader(gl, shaderSource, shaderType) { | |
var shader = gl.createShader(shaderType); | |
gl.shaderSource(shader, shaderSource); | |
gl.compileShader(shader); | |
return shader; | |
} |
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
// Extracting more detailed GPU information in a browser. | |
// NOTE: This won't work with some privacy settings enabled | |
// and has only been tested with the following return values | |
// Could be used to guess at a GPUs power using existing benchmarks here: | |
// https://www.videocardbenchmark.net/GPU_mega_page.html | |
// https://www.techpowerup.com/gpu-specs/ | |
// http://codeflow.org/entries/2016/feb/10/webgl_debug_renderer_info-extension-survey-results/ | |
// http://www.gpuzoo.com/ | |
// https://docs.google.com/spreadsheets/d/1wGRZ-5sl7G9DhIgwW36g2KnrwVfZqBW7GDKHOd2vbaM/edit#gid=0 |