If you are experimenting with WebGL, with a non-nVidia based graphics chip like Intel or AMD/ATI, you may have noticed it no longer works after an update to Google Chrome 10. Even in Firefox 4 with its much awaited WebGL support, things are not working well.

WebGL makes use of OpenGL to render 3D graphics in the web browser. Seems OpenGL and drivers are “disastrously buggy” that both Chrome and Firefox have decided to blacklist certain graphic cards. If you are feeling brave and want to bypass these restrictions, here’s how to go ahead..

DISCLAIMER:

DO this at your own risk. Engineers at Google and Mozilla must have very important reasons to block these and cripple 3D support in the browser like this for many users, considering the awesomeness of WebGL

In Google Chrome

You just have to run it with ‘–ignore-gpu-blacklist’ startup switch.

At the terminal use the command

google chrome --ignore-gpu-blacklist

In Mozilla Firefox

If you are using an Intel graphics card, you might have to install OSMesa first, which is a software implementation for OpenGL which enables off-screen rendering. You’ll find the package as ‘libosmesa6-dev’ in Synaptic Package Manager or try the old school method

sudo apt-get install libosmesa6-dev

Then run the following command to run Firefox, bypassing the blacklist.

MOZ_GLX_IGNORE_BLACKLIST=1 firefox

Goto about:config and search for following parameters and make sure they are set as below.

webgl.disabled:false webgl.force-enabled:false webgl.force_osmesa:false webgl.osmesalib:/usr/lib/libOSMesa.so webgl.prefer-native-gl:false webgl.shader_validator:true webgl.verbose:false

To check whether its working properly Goto a page like Google Body Browser or examples like this at Learning WebGL. To know more about your graphic card in Ubuntu try the following commands.

inxi -G lshw -C video glxinfo | grep render

Here are some more related resources:

Learning WebGL http://learningwebgl.com/blog/

Planet WebGL http://www.planet-webgl.org/

WebGL on Intel cards http://www.guciek.net/en/js/webgl_intel

Awesomeness of WebGL http://www.slideshare.net/evilhackerdude/webgl-awesomeness

WebGL @ Mozilla Developer Documentation https://developer.mozilla.org/en/WebGL

News Story at OSNews http://www.osnews.com/story/24264/No_Hardware_Acceleration_Firefox_for_Linu