Using SDL2 - Pyra Wiki

Revision as of 15:00, 27 June 2021 by sebt3 (talk | contribs) (Created page with "By default, SDL2 will use MESA llvm-pipe rendering which is slow. There's 2 options to enable SGX rendering depending on the profile the apps use. == Default profile == These...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

By default, SDL2 will use MESA llvm-pipe rendering which is slow. There's 2 options to enable SGX rendering depending on the profile the apps use.

Default profile

These apps expect a full OpenGL context which the pyra doesnt have natively. Luckyly, gl4es exist to correct this issue. To use it, just set this variable before starting the app:

export SDL_OPENGL_LIBRARY=/usr/lib/arm-linux-gnueabihf/gl4es/libGL.so.1

GLES profile

Theses apps can use the SGX directly.

While compiling them, you should set :

export CFLAGS="-I/opt/omap5-sgx-ddk-um-linux/include" LD_FLAGS="-L/opt/omap5-sgx-ddk-um-linux/lib"

And since a full GL context is known by SDL2, it will try to use it by default. To force SDL to pick the GLES context nonetheless at run time use:

export SDL_OPENGL_ES_DRIVER=1 SDL_VIDEO_EGL_DRIVER=/opt/omap5-sgx-ddk-um-linux/lib/libEGL.so.1
Back
Top