====== Web Browsers - Enable WebGL ======
Check **[[https://caniuse.com/#feat=webgl|caniuse.com/webgl]]** to see whether your browser supports WebGL.
If your browser supports WebGL, follow these instructions to enable it:
----
===== Chrome =====
First, enable hardware acceleration:
* Go to **chrome://settings**.
* Click the **Advanced ▼** button at the bottom of the page.
* In the **System** section, ensure the **Use hardware acceleration when available** checkbox is checked.
**NOTE**: You will need to relaunch Chrome for any changes to take effect.
----
Then enable WebGL:
* Go to **chrome://flags**.
* Ensure that **Disable WebGL** is not activated.
**NOTE**: You will need to relaunch Chrome for any changes to take effect.
* In newer versions, this option of **Disable WebGL** will not be available, you will instead have to search for **WebGL 2.0** (or some different version).
* Here you will have to change Default to **Enabled** in the drop down.
* [Try this if above doesn't work] Enable - [[https://stackoverflow.com/a/40774172/315445|Override software rendering list]].
----
Then inspect the status of WebGL:
* Go to **chrome://gpu**.
* Inspect the WebGL item in the Graphics Feature Status list.
* The status will be one of the following:
* Hardware accelerated — WebGL is enabled and hardware-accelerated (running on the graphics card).
* Software only, hardware acceleration unavailable — WebGL is enabled, but running in software. See [[http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome#TOC-Appendix-B:-The-Software-Compositor|here]] for more info: "For software rendering of WebGL, Chrome uses [[https://www.transgaming.com/swiftshader|SwiftShader]], a software GL rasterizer."
* Unavailable — WebGL is not available in hardware or software.
If the status is not "Hardware accelerated", then the **Problems Detected** list (below the the **Graphics Feature Status** list) may explain why hardware acceleration is unavailable.
----
If your graphics card/drivers are blacklisted, you can override the blacklist.
**WARNING**: This is not recommended!
Certain graphics cards and drivers are blacklisted by some browsers, because they are known to contain serious bugs or cause crashes. In very severe cases, these can even cause the entire computer to freeze! For example, [[https://code.google.com/p/chromium/issues/detail?id=134015|this issue]] causes certain Mac computers to freeze and require restarting.
Many browsers have an option to override the blacklist (ie: attempt to use the blacklisted features, despite the risks). This is **not recommended!** You should only override the blacklist if you understand and accept the risks.
More information is available here:
* [[https://www.khronos.org/webgl/wiki/BlacklistsAndWhitelists|WebGL Blacklists]].
* [[https://chromium.googlesource.com/chromium/src/gpu/+/master/config/software_rendering_list.json|Chrome: Blacklisted GPU features]].
* [[https://code.google.com/p/chromium/codesearch#chromium/src/gpu/config/gpu_driver_bug_list_json.cc|Chrome: GPU driver bug list]]
* [[https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers|Firefox: Blocked graphics drivers]].
To override the blacklist:
* Go to **chrome://flags**.
* Activate the Override software rendering list setting (you'll need to relaunch Chrome for any changes to take effect)
For more information, see: [[https://support.google.com/chrome/answer/1220892|Chrome Help: WebGL and 3D graphics]].
----
Upgrading graphics drivers
If your graphics drivers are too old to support WebGL, you may be able to upgrade them.
More information is available here:
* [[https://support.google.com/chrome/answer/1202946|Chrome: Graphics aren't showing properly]]
----
===== Firefox =====
First, enable WebGL:
* Go to **about:config**.
* Search for **webgl.disabled**.
* Ensure that its value is **false**.
**NOTE:** Any changes take effect immediately without relaunching Firefox.
----
Then inspect the status of WebGL:
* Go to **about:support**.
* Inspect the **WebGL Renderer** row in the **Graphics** table:
* If the status contains a graphics card manufacturer, model and driver (eg: "NVIDIA Corporation -- NVIDIA GeForce GT 650M OpenGL Engine"), then WebGL is enabled.
* If the status is something like "Blocked for your graphics card because of unresolved driver issues" or "Blocked for your graphics driver version", then your graphics card/driver is blacklisted.
----
If your graphics card/drivers are blacklisted, you can override the blacklist.
**WARNING**: This is not recommended!
Certain graphics cards and drivers are blacklisted by some browsers, because they are known to contain serious bugs or cause crashes. In very severe cases, these can even cause the entire computer to freeze! For example, [[https://code.google.com/p/chromium/issues/detail?id=134015|this issue]] causes certain Mac computers to freeze and require restarting.
Many browsers have an option to override the blacklist (ie: attempt to use the blacklisted features, despite the risks). This is **not recommended!** You should only override the blacklist if you understand and accept the risks.
More information is available here:
* [[https://www.khronos.org/webgl/wiki/BlacklistsAndWhitelists|WebGL Blacklists]].
* [[https://chromium.googlesource.com/chromium/src/gpu/+/master/config/software_rendering_list.json|Chrome: Blacklisted GPU features]].
* [[https://code.google.com/p/chromium/codesearch#chromium/src/gpu/config/gpu_driver_bug_list_json.cc|Chrome: GPU driver bug list]]
* [[https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers|Firefox: Blocked graphics drivers]].
To override the blacklist:
* Go to **about:config**.
* Search for **webgl.force-enabled**.
* Set it to **true***.
**NOTE:** (Like Chrome, Firefox has a Use hardware acceleration when available checkbox, in **Preferences -> Advanced -> General -> Browsing**.
However, unlike Chrome, Firefox does not require this checkbox to be checked for WebGL to work.
----
Upgrading graphics drivers
If your graphics drivers are too old to support WebGL, you may be able to upgrade them.
More information is available here:
* [[https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration|https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration]]
----
===== Safari =====
* Go to Safari's **Preferences**.
* Select the **Advanced** tab*
* Ensure that the **Show Develop** menu in menu bar checkbox is **checked**.
* In Safari's **Develop** menu, select **Experimental Features** sub-menu and ensure that WebGL 2.0 is **checked**.
----
===== References =====
https://caniuse.com/#feat=webgl