On WebGL,Raspberry Pi 3 and Chromium

I did a couple of interesting things on the Raspberry Pi before but this is the first time I’m really looking at the GPU.

I always took for granted that the Raspberry Pi 3 is a cheap mini computer with GPU that can play 1080p video. Cool right? Until I started running things that require WebGL, then the headache comes. I must admit it’s also due to my lack of knowledge on WebGL.

I shall put everything here quickly and not talk about the headache.

  1. Check GPU setting.
Check if GPU is enabled

If not enabled, go to Settings –> Advanced –> Enable “Use hardware acceleration when available

Enable GPU

Check the GPU again. If still not enabled, continue.

For Raspberry Pi / Raspbian only, look for this file:


Inside this file contains the flags for Chromium

[email protected]:~# cat /etc/chromium-browser/customizations/00-rpi-vars
CHROMIUM_FLAGS="--ignore-gpu-blacklist --disable-quic --enable-fast-unload --enable-tcp-fast-open"
#CHROMIUM_FLAGS="--ignore-gpu-blacklist --disable-quic --enable-fast-unload --enable-tcp-fast-open --disable-gpu-compositing --ppapi-flash-version="

Insert “–ignore-gpu-blacklist” and remove “–disable-gpu-compositing”

In this case, we were actually doing an animation using Phaser.io which uses GPU and WebGL extensively. Do bear in mind that each GPU has a max texture it can render. In the case of Raspberry Pi, it’s 2048 x 2048. ie your images must not be bigger than this size or Phaser will not render it.

Author: yibi

YiBi's numb :) YiBi writes about anything. Technology, Gossips, Rubbish YiBi's a half f%#k geek :P

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.