Getting a WebGL Implementation: Difference between revisions

From WebGL Public Wiki
Jump to navigation Jump to search
W-sky (talk | contribs)
made clear that WebGL is not only supported by Chrome but Chromium too
No edit summary
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The WebGL 1.0 specification has recently been released, and the latest builds of several browsers are close to reaching full conformance. Here are instructions on how to obtain a copy of a browser supporting the WebGL specification. As various implementations reach 100% conformance, expect that browsers will have this functionality built in to their latest releases, and not require any manual steps to enable it.
== WebGL 1.0 ==


=== Firefox ===
WebGL 1.0 is supported in the stable releases of most major browsers on both desktop and mobile platforms. Chrome, Firefox, Internet Explorer, Opera, and Safari are all known to have good WebGL support on both desktop and mobile browsers. See http://caniuse.com/#feat=webgl for availability details.
 
Technical issues such as known hardware problems or lack of required GPU features may prevent WebGL from running in some cases.


WebGL is supported in [http://www.mozilla.com/en-US/firefox/new/ Firefox/4.0]
== WebGL 2.0 ==


For testing/debugging purposes, software rendering can be used through OSMesa (off-screen Mesa), by setting the "webgl.osmesalib" variable to point to the OSMesa shared library (typically /usr/lib/libOSMesa.so). Note that the OSMesa library is required to use "gl" prefixes, not "mgl".
The [https://www.khronos.org/registry/webgl/specs/latest/2.0/ WebGL 2.0 specification] has recently been released, and developers can now begin experiementing with the new functionality in some browsers. Existing implementations have known functionality gaps and may lack some validation that will be present once WebGL 2.0 is available in stable builds. They are provided to encourage early developer feedback.


You can also try setting the "webgl.force-enabled" variable to true if WebGL is not working. Variables can be accessed by typing "about:config" in the address bar.
WebGL 2.0 requires hardware with OpenGL ES 3.0 support or comparable desktop OpenGL feature support. Not all systems capable of running WebGL 1.0 will be able to run WebGL 2.0.


=== Safari ===
=== Firefox ===


WebGL is supported on Mac OS X 10.6 in the [http://nightly.webkit.org/ WebKit nightly builds].
See https://wiki.mozilla.org/Platform/GFX/WebGL2 for instructions on how to enable WebGL 2 in Firefox.  


After downloading and installing the browser, open the Terminal and type the following:
Please file bugs for any issues you discover with Firefox’s WebGL 2.0 implementation at https://bugzilla.mozilla.org/


<pre>
=== Chrome ===
defaults write com.apple.Safari WebKitWebGLEnabled -bool YES
</pre>


This command only needs to be run once. All future invocations of the browser will run with WebGL enabled.
Experimental WebGL 2.0 support is available in recent [https://www.google.com/chrome/browser/canary.html Chrome Canary] builds. It can be enabled either by passing the “--enable-unsafe-es3-apis” flag on the command line, or enabling it in about:flags. The prototype is currently available on Android, Linux, Mac OS, and Windows.


=== Chrome / Chromium ===
When enabled, WebGL 2.0 contexts can be created with the “webgl2” context ID.


WebGL is available in the stable releases of [http://www.google.com/chrome/ Chrome] and [http://www.chromium.org/Home Chromium] for desktop platforms. Chromium is included in many software repositories for Linux based systems. Chrome for Mobile does not yet support WebGL due to known limitations with existing graphics drivers.
Please file bugs for any issues you discover with Chrome’s WebGL 2.0 implementation at https://crbug.com In addition to describing the problem please navigate to about:gpu and attach the contents of that page to your report, which will help the developers identify the problem in the case that the issue is GPU or OS specific.


Please report issues you find to either the [https://www.khronos.org/webgl/public-mailing-list/ public WebGL mailing list] or via the [http://code.google.com/p/chromium/issues/list Chromium issue tracker].
=== Demos ===


=== Opera ===
Here are a few links to demos using WebGL 2.0 with which you can verify that your browser has it properly enabled. Note that due to bugs in implementations, these may not work correctly in all browsers.


WebGL is supported in [http://www.opera.com/browser/next/ Opera 12 beta] but you must ''enable'' it
* [http://toji.github.io/webgl2-particles-2/ WebGL 2.0 Particles] ([https://github.com/toji/webgl2-particles-2 Github repository])
in the user preferences. Enter opera:config in the address bar. In the User Prefs section set both
* [http://toji.github.io/webgl2-crowd/ WebGL 2.0 Crowd] ([https://github.com/toji/webgl2-crowd Github repository])
Enable Hardware Acceleration and Enable WebGL to 1. Scroll to the bottom of the list of user preferences
* [http://www.ibiblio.org/e-notes/webgl/webgl.htm Evgeny Demidov's WebGL demos] (see WebGL 2.0 links at the top of the page)
and click the Save button. Restart the browser.
* [http://webglsamples.org/WebGL2Samples/ WebGL 2.0 Samples Pack] ([https://github.com/WebGLSamples/WebGL2Samples Github repository])

Latest revision as of 21:53, 18 October 2016

WebGL 1.0

WebGL 1.0 is supported in the stable releases of most major browsers on both desktop and mobile platforms. Chrome, Firefox, Internet Explorer, Opera, and Safari are all known to have good WebGL support on both desktop and mobile browsers. See http://caniuse.com/#feat=webgl for availability details.

Technical issues such as known hardware problems or lack of required GPU features may prevent WebGL from running in some cases.

WebGL 2.0

The WebGL 2.0 specification has recently been released, and developers can now begin experiementing with the new functionality in some browsers. Existing implementations have known functionality gaps and may lack some validation that will be present once WebGL 2.0 is available in stable builds. They are provided to encourage early developer feedback.

WebGL 2.0 requires hardware with OpenGL ES 3.0 support or comparable desktop OpenGL feature support. Not all systems capable of running WebGL 1.0 will be able to run WebGL 2.0.

Firefox

See https://wiki.mozilla.org/Platform/GFX/WebGL2 for instructions on how to enable WebGL 2 in Firefox.

Please file bugs for any issues you discover with Firefox’s WebGL 2.0 implementation at https://bugzilla.mozilla.org/

Chrome

Experimental WebGL 2.0 support is available in recent Chrome Canary builds. It can be enabled either by passing the “--enable-unsafe-es3-apis” flag on the command line, or enabling it in about:flags. The prototype is currently available on Android, Linux, Mac OS, and Windows.

When enabled, WebGL 2.0 contexts can be created with the “webgl2” context ID.

Please file bugs for any issues you discover with Chrome’s WebGL 2.0 implementation at https://crbug.com In addition to describing the problem please navigate to about:gpu and attach the contents of that page to your report, which will help the developers identify the problem in the case that the issue is GPU or OS specific.

Demos

Here are a few links to demos using WebGL 2.0 with which you can verify that your browser has it properly enabled. Note that due to bugs in implementations, these may not work correctly in all browsers.