3.10 Raspberry Pi peculiarities

RebelSDL can be very useful on the Raspberry Pi because of its comparatively poor CPU which makes Hollywood's inbuilt CPU renderer very slow. Using RebelSDL will give you hardware-accelerated drawing and scaling which can boost your script's performance dramatically. However, there are some things that you have to keep in mind. First of all, there are two entirely different drivers available for the Raspberry Pi:

  1. VideoCore 4 OpenGL driver (KMS/DRM): Since 2017 Raspbian Jessie ships with an experimental vc4 KMS/DRM OpenGL driver. To enable this driver, you need to run sudo raspi-config go to the Advanced Options settings and then select GL (Full KMS) in the GL Driver menu. Once you have rebooted your system, X11 will then use this new vc4 driver and RebelSDL will be able to use it too. Note that you have to make sure that you're using a recent version of Raspbian Jessie (2017 or newer) or Raspbian Stretch. Older versions of Jessie don't have this driver yet. Also note that as of September 2017, activating the new vc4 driver breaks HDMI audio output on Jessie (not on Stretch). So as of September 2017, you'll only be able to get audio through the headphone output on Jessie when the vc4 driver is enabled.

  2. Raspberry Pi native driver: This is an alternative driver which directly accesses the graphics hardware of the Pi bypassing OpenGL and X11 completely. This means that you can run your scripts from outside X11 as well. This driver will also work with older versions of Raspbian Jessie but only if the experimental OpenGL driver (see above) is disabled. To activate the native Raspberry Pi renderer, you need to pass rpi to the RenderDriver tag when @REQUIRE'ing RebelSDL, like so:

     
    @REQUIRE "rebelsdl", {RenderDriver = "rpi"}
    

    RebelSDL will then use the native Raspberry Pi renderer. Note that since the native Pi renderer operates outside X11 it will always take over the whole screen. It is not possible to run the native Pi renderer in windowed mode. It will always fill the entire screen. All Hollywood features that require a window won't work with the native Pi renderer either.

By default, RebelSDL will use the vc4 OpenGL driver and if it is not there, it will fall back to software OpenGL mode, which is of course very slow. The native Pi renderer will only be activated if you explicitly request it like shown above.


Show TOC