0 Favourites

WebGL on Raspberry Pi: easier than ever

Subscribe

Get emailed when there are new posts!

Stats

  • 388 words
  • ~2-3 mins read time
  • Published
  • 305 visits
  • 3.8 visits per week
  • 342 page views

License

This blog post is licensed Creative Common Attribution Required v4.0.

Share

Enjoy this blog? Share with your contacts!

Share now

I've blogged twice before about WebGL on the Raspberry Pi. I think it's awesome that you can get such a cheap and hackable system and run modern web technology on it. Back in January the process was very much unofficial and experimental. By February it was easier but the browser support on Raspbian still wasn't great. Fortunately just a few months later the new Raspbian Jessie with PIXEL release comes with Chromium as the official default browser! This makes using the latest web technologies like WebGL a lot easier.

Chromium is the open-source browser engine behind Chrome. It is essentially the same as Chrome but with some of Google's technology stripped out, such as support for proprietary media codecs like AAC, and the auto-update system. The web platform support is still more or less as complete as Chrome's, including full WebGL support.

Unfortunately the new OpenGL driver that enables WebGL support in Chromium is still experimental and has to be enabled manually. However this is now the only step to get WebGL on the Raspberry Pi! As described in the previous blog post all you need to do is install the latest Raspbian with PIXEL and Chromium. Then open a terminal and run sudo raspi-config - then in the menu that appears choose Advanced Options, GL Driver, then select Enable. Once you're done reboot the system and Chromium will support WebGL! You can verify the status of WebGL support by visiting chrome://gpu in the address bar (this works on any platform in Chrome as well).

The performance still isn't brilliant, but running Space Blaster it could get about 30 FPS with a reasonable window size on a Raspberry Pi 2. The Raspberry Pi 3 with its better specs should of course be faster, but I haven't got one right now. Future updates to the OpenGL driver could improve performance significantly too. Still, this means it's reasonably straightforward to get modern web content like Construct 2 games running on a Raspberry Pi!

The next step is to get the OpenGL driver mature and performant enough to enable by default. Then WebGL support should work in Chromium out of the box! It looks like the driver is still under active development. Hopefully it will be enabled by default in a future update. I'll be keeping an eye on it!

Disabled Comments have been disabled for this blog post by the owner.