Paint Pixels to Screen via Linux FrameBuffer

前端 未结 7 1806
谎友^
谎友^ 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:35

    I'm thinking of writing a framebuffer-based program, just because I need to be able to scroll (SDR waterfall). See https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=232493&p=1425567#p1425567 The scroll test I consider successful. In those 2 structs we fetch by ioctl for info there's also stuff about color depth. You seem to have based your program on the same example I did. How to get pixel colour from framebuffer on linux (Raspberry Pi)

    Mine works fine on my Raspberry Pi, either with X or not. It has no effect on the screen on my laptop. That has a /dev/fb0, the program runs and the numbers look right, but it does nothing visually. Maybe it's double buffered or something.

    Under X it doesn't actually do any damage. If you drag some windows around so things redraw everything comes back. Then I decided to back up what's on the screen and put it back when I was done, that works too. A window that I moved and put back works the same as if I'd never touched it. X doesn't realize I've messed with the screen buffer, it knows what it put there and registers mouse clicks accordingly. If I moved a window and didn't put it back the clicks would still work where it was.

提交回复
热议问题