0

When I visit https://browserleaks.com/webgl it shows my driver name under the WebGL Context Info > ANGLE

I want to ask, how does javascript is able to access such info? I thought at first that they are accessing my registry keys, but I changed all the names of my driver in the registry and still was being detected by javascript (old name that I changed)

So if it is not the registry, then how does javascript deal with the OS to inquire about my driver's name?

Thank you guys

Ibrahim D.
  • 318
  • 4
  • 17
  • Possible duplicate : https://stackoverflow.com/questions/15464896/get-cpu-gpu-memory-information – pirs Oct 23 '17 at 01:38
  • @pirs thanks but I don't want to know how to show my driver nane, I want to know how javascript (WebGL) communicates with the OS to get this info? – Ibrahim D. Oct 23 '17 at 02:00

2 Answers2

3

You can do it with a webgl canvas:

var canvas = document.getElementById("myTestCanvas");

var gl = canvas.getContext("experimental-webgl"); // or webgl
console.log(gl.getParameter(gl.RENDERER));
console.log(gl.getParameter(gl.VENDOR));

var debug = gl.getExtension('WEBGL_debug_renderer_info');
console.log(gl.getParameter(debug.UNMASKED_VENDOR_WEBGL)); // drivers
console.log(gl.getParameter(debug.UNMASKED_RENDERER_WEBGL));

// and many others

Note: WebGL is directly related with OpenGL

More at:

https://developer.mozilla.org/fr/docs/Web/API/WEBGL_debug_renderer_info

https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getExtension

pirs
  • 2,410
  • 2
  • 18
  • 25
-1

As it turned out, WebGL access my system via DirectX (Direct3D)

Ibrahim D.
  • 318
  • 4
  • 17