Page 1 of 1

SDL2+GLES20 issues...

Posted: Tue Sep 13, 2016 10:19 pm
by marksibly
Hi,

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!

Bye,
Mark

Re: SDL2+GLES20 issues...

Posted: Thu Sep 15, 2016 12:02 am
by marksibly
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?

Re: SDL2+GLES20 issues...

Posted: Sun Sep 18, 2016 9:48 pm
by raysan5
Hello marksibly,

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

More info here: https://github.com/raysan5/raylib/wiki/ ... spberry-Pi

:)