I have Raspbian Jessie running on my Pi2. I am currently booting into LXDE. I want to disable X and run my SDL code directly on the framebuffer. Can someone point me to where I can find more information on how to do this?

P.S. I can see that I can write to /dev/fb directly, but is this hardware-accelerated?


1 Answer 1


Link with instructions to build SDL2 (no X) on Pi: https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/ you will get hardware accelerated graphics with SDL2

For more fun just use dispmanx/EGL/OpenVG for hardware accelerated graphics.

A user here has reported that "The sdl2-config --cflags --libs compiler option found on the above link saved the day for me". This output of this is applied as a shell command (i.e., it works like a kind of macro) when building applications to be linked against the library like this:

g++ -o program_name program_name.cpp `sdl2-config --cflags --libs`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.