SDL2 opengles2 foreign window

Hello,

I’m using a recent SDL2 from Mercurial. I am trying to embed a SDL_Window (i.e.
SDL_CreateWindowFrom()) inside of another window using opengles2 as my render driver.

On a desktop (openSUSE 13.2 - One with the Intel driver and another with the proprietary nvidia
driver) I force the opengles2 driver using SDL_HINT_RENDER_DRIVER and the program works fine.

However, when compiled on an ODROID (Mali driver), I receive “Cannot create renderer”. It does work
on the ODROID when I use “opengl” as the render driver. In this case, SDL2 uses the Mesa driver
which is very very slow!

If I do not embed the window, SDL2 creates its own window and the application works fine.

Does anyone know if this an issue with SDL2 and opengles2 (I’ve also tried opengles which didn’t
work either) or an issue with the Mali driver?

I should note that I am not explicitly using opengles2 in my application. I’m just using SDL2’s
Accelerated 2D render API.

Any direction would be greatly appreciated.

Thanks.

Alvin

Replying to myself just in case someone else tries this in the future.

As a workaround, I switched to the “software” renderer. The
performance is “good enough”. This only works since I am only using
the 2D render API.

AlvinOn Wed, Sep 16, 2015 at 11:00 AM, Alvin Beach <@Alvin_Beach> wrote:

Hello,

I’m using a recent SDL2 from Mercurial. I am trying to embed a SDL_Window (i.e.
SDL_CreateWindowFrom()) inside of another window using opengles2 as my render driver.

On a desktop [snip] the program works fine.

However, when compiled on an ODROID (Mali driver), I receive “Cannot create renderer”.

[snip]

I should note that I am not explicitly using opengles2 in my application. I’m just using SDL2’s
Accelerated 2D render API.