A better way to get WebGL on the Raspberry Pi 2

1
Official Construct Team Post
Ashley's avatar
Ashley
  • 11 Feb, 2016
  • 337 words
  • ~1-2 mins
  • 2,630 visits
  • 0 favourites

In January I blogged about a very hacky way to get WebGL working on the Raspberry Pi 2. However Raspbian got an update in February which adds an experimental OpenGL driver in the official release. This makes setting up WebGL a lot easier! Currently the OpenGL support needs to be manually enabled, but hopefully future releases will enable it by default.

All you need to do now is download the latest Raspbian, which is currently Raspbian Jessie (February 2016) and install it normally. Once installed, open a terminal and type: sudo raspi-config

If it's your first boot, you probably want to choose Expand Filesystem here as usual and reboot. After that, go to raspi-config again and select Advanced Options. From the list, select GL Driver and then choose Enable. Reboot and now your system is ready for WebGL! All you need now is a browser that supports it. The browser situation sadly hasn't changed much since the previous blog post. Even with the experimental OpenGL driver, the browser support is the same as described in the previous blog: only Chromium works well. Refer to that blog post for tips on how to set up Chromium and IceWeasel as well.

Anyway, at least the OS setup is easier now that it's in official support. The new driver seems a bit faster and a bit more reliable, and the HelloRacer demo looks a bit more complete (although there are still some glitches). There is still a lot of progress to be made here, I am pretty sure the hardware can do better than the current performance, but hopefully future updates will keep improving the driver further. I'm also hopeful the next IceWeasel version will do better, but it's on a slower cycle than Firefox, only updating on Extended Support Releases (ESR) which come less frequently.

Not bad progress for a month - good work Raspberry Pi coders!

Subscribe

Get emailed when there are new posts!