Paint Pixels to Screen via Linux FrameBuffer

前端 未结 7 1763
谎友^
谎友^ 2020-12-01 00:56

I was recently struck by a curious idea to take input from /dev/urandom, convert relevant characters to random integers, and use those integers as the rgb/x-y values for pix

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 01:23

    If you're running X11, you MUST go through X11 APIs to draw to the screen. Going around the X server is very broken (and, often as you've seen, does not work). It may also cause crashes, or just general display corruption.

    If you want to be able to run everywhere (both console & under X), look at SDL or GGI. If you only care about X11, you can use GTK, QT, or even Xlib. There are many, many options...

提交回复
热议问题