3

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?

Greenonline
  • 2,969
  • 5
  • 27
  • 38
sparkymat
  • 131
  • 1
  • 1
  • 4

1 Answers1

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`
goldilocks
  • 60,325
  • 17
  • 117
  • 234
Mariusz
  • 1
  • 1