Posts: 6
Joined: Sun Jul 01, 2012 10:16 am

SDL2 hardware acceleration

Tue Oct 06, 2015 1:53 pm

It seems that the Jessie sdl2 package is not built with OpenGL ES hardware acceleration.

Code: Select all

fails with "Couldn't find matching render driver"

So I resorted to building SDL2 from source as outlined in this article: ... ted-sdl-2/

which involves configuring prior to make with:

Code: Select all

../configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
Now when I run my test program SDL_CreateRenderer succeeds, but the rendering is still very slow. I suspect that I am not getting true hardware acceleration, but some form of software implementation.

If I list the available video drivers with SDL_GetNumVideoDrivers and SDL_GetVideoDriver I get two: "RPI" and "dummy".

How can I ensure that I have true hardware acceleration using OpenGL ES when I build SDL2 ?

Posts: 137
Joined: Mon Nov 26, 2012 6:58 pm

Re: SDL2 hardware acceleration

Sat Oct 10, 2015 2:40 am

If it's useful you can use the RetroPie-Setup script to get a working SDL2 installed with HW acceleration

clone it, and then you can just do

Code: Select all

sudo ./ sdl2
to build/install new SDL2 debs.

Posts: 739
Joined: Mon Jan 07, 2013 9:11 am

Re: SDL2 hardware acceleration

Sun Oct 11, 2015 9:07 am

Thank you kindly.

It took < an hour to build that lot & seemed to install without problems, & it looks like Stella may work accelerated now :)

Return to “Graphics programming”