Getting a WebGL Implementation: Difference between revisions
Added clarification that Chromium is preferred over Chrome Dev channel at present. |
|||
Line 41: | Line 41: | ||
'''Note''' that enabling WebGL currently requires disabling Chromium's security sandbox, which is strongly discouraged for arbitrary web browsing. Work is ongoing to remove this requirement. | '''Note''' that enabling WebGL currently requires disabling Chromium's security sandbox, which is strongly discouraged for arbitrary web browsing. Work is ongoing to remove this requirement. | ||
In addition, slightly less frequently updated support for WebGL is now in the Chrome Dev channel, you can install/switch to the Dev Channel using the utility provided at http://dev.chromium.org/getting-involved/dev-channel | In addition to the support in Chromium, slightly less frequently updated support for WebGL is now in the Chrome Dev channel, you can install/switch to the Dev Channel using the utility provided at http://dev.chromium.org/getting-involved/dev-channel |
Revision as of 14:53, 4 March 2010
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 the nightly builds of Firefox. Visit http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ for builds on Linux (32- and 64-bit), Mac OS X and Windows.
After downloading the browser, enable WebGL: type about:config into the address bar, search for "webgl", and double-click "webgl.enabled_for_all_sites" to set it to true.
The implementation requires working OpenGL 2.1 drivers. If OpenGL is not available, software rendering can be used through Mesa, by setting the "webgl.osmesalib" variable to point to a version of OSMesa compiled with MGL namespace mangling.
Safari
WebGL is supported on Mac OS X 10.6 in the WebKit nightly builds available at http://nightly.webkit.org/ .
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
Chromium is the Open Source project behind the Google Chrome browser, and its continuous builds are currently the best way to get WebGL support in a Chrome-style browser under Linux, Mac OS X, and Windows. The most recent builds are available here:
- Linux 32-bit: http://build.chromium.org/buildbot/continuous/linux/LATEST/
- Linux 64-bit: http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/
- Mac OS X: http://build.chromium.org/buildbot/continuous/mac/LATEST/
- Windows: http://build.chromium.org/buildbot/continuous/win/LATEST/
Linux/32, Mac and Windows point to the folder containing chrome-linux.zip
, chrome-mac.zip
, or chrome-win32.zip
. For Linux/64, choose the highest numbered folder. Unpack the zip archive.
Chromium must be launched from the command line in order to enable WebGL.
- Linux:
./chrome --no-sandbox --enable-webgl
- Mac OS X:
Chromium.app/Contents/MacOS/Chromium --no-sandbox --enable-webgl
- Windows:
chrome.exe --no-sandbox --enable-webgl
Note that enabling WebGL currently requires disabling Chromium's security sandbox, which is strongly discouraged for arbitrary web browsing. Work is ongoing to remove this requirement.
In addition to the support in Chromium, slightly less frequently updated support for WebGL is now in the Chrome Dev channel, you can install/switch to the Dev Channel using the utility provided at http://dev.chromium.org/getting-involved/dev-channel