Posts: 2
Joined: Tue Sep 13, 2016 1:26 am

SDL2+GLES20 issues...

Tue Sep 13, 2016 10:19 pm


Just got a new raspberry pi3 and loving it so far!

However, I am trying to get an SDL2/GLES20 based project going and am having some problems.

For starters, it wont run at all. SDL_CreateWindow always fails with 'Could not get EGL display'.

Could this be because I'm running the app from the 'desktop' and I should be running it gui-less?

If so, does this mean we only get accelerated GLES20 in 'fullscreen' mode, not in a desktop window?

I did have some luck with a plain OpenGL build, but of course it's software emulated and VERY slow. Tried the experimental HW driver for GL too, and it worked (once) but was a bit glitchy. Besides, the GLES20 HW driver should be the cleanest/fastest, right?

Any clues greatly appreciated!


Posts: 2
Joined: Tue Sep 13, 2016 1:26 am

Re: SDL2+GLES20 issues...

Thu Sep 15, 2016 12:02 am

Well, gave up on accelerated GLES20 on the desktop and managed to get 'fullscreen' working.

However, there's another problem here - once I've gone into fullscreen, I can't go into fullscreen again.

For example the 'parent' app goes into fullscreen, then attempts to launch a 'child' app (process) which also tries to go fullscreen but failing to do so.

Is this something to do with the dispmanx 'layer'? SDL2 uses a constant '10000' for this so I was thinking maybe you can only have one thing per layer? I did try to set the child layer to '10002' but that didn't help.

Is this even possible?

Posts: 37
Joined: Tue Sep 30, 2014 4:44 pm
Location: Barcelona
Contact: Website

Re: SDL2+GLES20 issues...

Sun Sep 18, 2016 9:48 pm

Hello marksibly,

Maybe you can try using raylib ( It doesn't work on desktop, only fullscreen, and does not depend on X-Windows.

More info here: ... spberry-Pi


Return to “C/C++”