Getting a WebGL Implementation: Difference between revisions
Kbr google (talk | contribs) Added link to Chrome 9 beta |
Paul.irish (talk | contribs) updating this page to be more up-to-date |
||
Line 3: | Line 3: | ||
=== Firefox === | === Firefox === | ||
WebGL is supported in | WebGL is supported in [http://www.mozilla.com/en-US/firefox/all-beta.html Firefox/4.0b8+] by default (and in previous betas with "webgl.enabled_for_all_sites" set to true in about:config.) It's also available in [http://nightly.mozilla.org/ Firefox Nightly builds]. | ||
The implementation requires working OpenGL 2.1 drivers and the availability of PBuffers. | The implementation requires working OpenGL 2.1 drivers and the availability of PBuffers. | ||
Line 13: | Line 11: | ||
=== Safari === | === Safari === | ||
WebGL is supported on Mac OS X 10.6 in the | WebGL is supported on Mac OS X 10.6 in the [http://nightly.webkit.org/ WebKit nightly builds]. | ||
After downloading and installing the browser, open the Terminal and type the following: | After downloading and installing the browser, open the Terminal and type the following: | ||
Line 25: | Line 23: | ||
=== Chrome/Chromium === | === Chrome/Chromium === | ||
WebGL is available in the [http://www.google.com/chrome/ stable release of Chrome]. | |||
To test the most up-to-date code on Linux, Mac OS X and Windows, you can download the continuous builds of Chromium. Chromium is the Open Source project behind the Google Chrome browser. | To test the most up-to-date code on Linux, Mac OS X and Windows, you can download the continuous builds of Chromium. Chromium is the Open Source project behind the Google Chrome browser. | ||
Line 37: | Line 33: | ||
Linux/32, Mac point to the folder containing <code>chrome-linux.zip</code>, <code>chrome-mac.zip</code>, or <code>chrome-win32.zip</code>. Unpack the zip archive and cd into the resulting directory. Windows has the Chrome Canary build which should just install. | Linux/32, Mac point to the folder containing <code>chrome-linux.zip</code>, <code>chrome-mac.zip</code>, or <code>chrome-win32.zip</code>. Unpack the zip archive and cd into the resulting directory. Windows has the Chrome Canary build which should just install. | ||
Support for accelerated compositing is also compiled in for all three platforms. Enabling the compositor improves WebGL performance by avoiding expensive frame buffer readbacks when drawing the rendering results to the screen. Add the command line argument <code>--enable-accelerated-compositing</code> to test it. Note that the compositor support for WebGL is in early stages and is likely to be less stable. 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]. | Support for accelerated compositing is also compiled in for all three platforms. Enabling the compositor improves WebGL performance by avoiding expensive frame buffer readbacks when drawing the rendering results to the screen. Add the command line argument <code>--enable-accelerated-compositing</code> to test it. Note that the compositor support for WebGL is in early stages and is likely to be less stable. 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]. |
Revision as of 22:14, 7 February 2011
WebGL is currently under development, and is supported in the latest builds of several browsers. Here are instructions on how to obtain a copy of a browser supporting the provisional WebGL specification. As the specification nears completion, expect that browsers will have this functionality built in to their latest releases, and not require any manual steps to enable it.
Firefox
WebGL is supported in Firefox/4.0b8+ by default (and in previous betas with "webgl.enabled_for_all_sites" set to true in about:config.) It's also available in Firefox Nightly builds.
The implementation requires working OpenGL 2.1 drivers and the availability of PBuffers.
If OpenGL is not available, or 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".
Safari
WebGL is supported on Mac OS X 10.6 in the WebKit nightly builds.
After downloading and installing the browser, open the Terminal and type the following:
defaults write com.apple.Safari WebKitWebGLEnabled -bool YES
This command only needs to be run once. All future invocations of the browser will run with WebGL enabled.
Chrome/Chromium
WebGL is available in the stable release of Chrome.
To test the most up-to-date code on Linux, Mac OS X and Windows, you can download the continuous builds of Chromium. Chromium is the Open Source project behind the Google Chrome browser.
- Linux 32-bit: http://build.chromium.org/f/chromium/continuous/linux/LATEST/
- Linux 64-bit: http://build.chromium.org/f/chromium/continuous/linux64/LATEST/
- Mac OS X: http://build.chromium.org/f/chromium/continuous/mac/LATEST/
- Windows: http://tools.google.com/dlpage/chromesxs (the Chrome Canary Build)
Linux/32, Mac point to the folder containing chrome-linux.zip
, chrome-mac.zip
, or chrome-win32.zip
. Unpack the zip archive and cd into the resulting directory. Windows has the Chrome Canary build which should just install.
Support for accelerated compositing is also compiled in for all three platforms. Enabling the compositor improves WebGL performance by avoiding expensive frame buffer readbacks when drawing the rendering results to the screen. Add the command line argument --enable-accelerated-compositing
to test it. Note that the compositor support for WebGL is in early stages and is likely to be less stable. Please report issues you find to either the public WebGL mailing list or via the Chromium issue tracker.