const VENDOR = 'Google Inc. (Intel)';
const RENDERER = 'ANGLE (Intel, Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0, D3D11)';
[WebGLRenderingContext.prototype, WebGL2RenderingContext.prototype].forEach(proto => {
const orig = proto.getParameter;
proto.getParameter = function(param) {
if (param === 37445) return VENDOR; if (param === 37446) return RENDERER; return orig.call(this, param);
};
});
(function (vendor, renderer) {
const VENDOR = 0x9245, RENDERER = 0x9246; function patch(proto) {
const orig = proto.getParameter;
proto.getParameter = function (p) {
if (vendor && p === VENDOR) return vendor;
if (renderer && p === RENDERER) return renderer;
return orig.call(this, p);
};
}
if (window.WebGLRenderingContext) patch(WebGLRenderingContext.prototype);
if (window.WebGL2RenderingContext) patch(WebGL2RenderingContext.prototype);
})(WEBGL_VENDOR, WEBGL_RENDERER);