Created
March 20, 2025 17:14
-
-
Save NickDeckerDevs/0ea0669084f9cfa64bcd7914db04330d to your computer and use it in GitHub Desktop.
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
const canvas = document.createElement("canvas"); | |
const gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl"); | |
if (gl) { | |
const debugInfo = gl.getExtension("WEBGL_debug_renderer_info"); | |
if (debugInfo) { | |
const renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); | |
console.log("WebGL renderer:", renderer); | |
// If renderer string contains "SwiftShader" or "Software", hardware acceleration may be disabled. | |
} else { | |
console.log("WEBGL_debug_renderer_info not available."); | |
} | |
} else { | |
console.log("WebGL not supported."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment