-
WebGL in Chrome - How to Enable, Disable and Troubleshoot | oTechWorld
-
[GitHub] add-qwq/WebGL-GPU-Detector - Check if the browser is enabled/supports WebGL GPU acceleration (JS component)
-
gpu-detector.js - line 36
No browser GPU acceleration support detected 😥, which may cause page lag Please go to browser settings to enable options like "Use graphics acceleration when available" or "Hardware acceleration" After enabling, please restart the browser
-
Last active
February 13, 2026 13:42
-
-
Save erkobridee/13cb4f86d032b6bdf908d9c4b0feb20e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* | |
| based on: | |
| https://github.com/add-qwq/WebGL-GPU-Detector/blob/main/gpu-detector.js | |
| https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/By_example/Detect_WebGL | |
| */ | |
| export const hasWebGLSupport = () => { | |
| if (!window.WebGLRenderingContext) { | |
| return false | |
| } | |
| let canvas = null | |
| try { | |
| canvas = document.createElement('canvas') | |
| // Get WebGLRenderingContext from canvas element. | |
| const gl = canvas.getContext('webgl') | |
| if (!gl) return false | |
| return gl instanceof WebGLRenderingContext | |
| } catch (_e) { | |
| console.error('GPU acceleration detection exception') | |
| return false | |
| } finally { | |
| if (canvas && canvas.parentNode) { | |
| canvas.parentNode.removeChild(canvas) | |
| } | |
| } | |
| } | |
| export default hasWebGLSupport |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment