Why isn't it possible to dynamically use the Raspberry Pi video driver if available?

Suppose I want to create a binary that runs on the Raspberry Pi and on the ODroid. On the Raspberry Pi, SDL should use the native Raspberry Pi video driver through libbcm_host.so whereas on the ODroid it should use OpenGLES. AFAICS, this is currently impossible because all files in src/video/raspberry don’t dynamically open libbcm_host.so using dlopen() and dlsym() but access its functions through the corresponding header files which means that the resulting binary will have a dependency on libbcm_host.so and thus will only work on the Raspberry Pi, not on the ODroid.

Wouldn’t it be better if the Raspberry Pi driver was only loaded if available and otherwise there was a fallback to OpenGLES or OpenGL?


Sorry I can’t help you, but I tried to run my app on Odroid ( [LINUX] Has anyone tried SDL2 on SOC Odroid XU4? ) it doesn’t work.
Did you success ?