Initial commit
This commit is contained in:
28
README.md
Normal file
28
README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# libfb
|
||||
|
||||
Small library for interfacing with the Linux framebuffer.
|
||||
|
||||
Compile and install:
|
||||
```sh
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Usage example:
|
||||
|
||||
```c
|
||||
#define FB_IMPLEMENTATION // If linking dynamically with the library, omit this line
|
||||
#include <fb.h>
|
||||
|
||||
int main() {
|
||||
Framebuffer fb = newFramebuffer("/dev/fb0");
|
||||
writeColourToFramebuffer(&fb, (Pixel){100, 100}, (Colour){255, 0, 0, 0});
|
||||
destroyFramebuffer(&fb);
|
||||
}
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
* Don't try to write to the framebuffer while in an X.org or Wayland session
|
||||
* Your user must be in the `input` group before using, run the command `sudo usermod -a -G video $USER` to get permissions. Otherwise, the library will abort.
|
||||
* This is intended to be a small library to make it easier for anyone to draw things to the screen. Just pixel rendering.
|
||||
Reference in New Issue
Block a user