summaryrefslogtreecommitdiff
path: root/src/framebuffer.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-10-15 19:32:21 -0700
committer3gg <3gg@shellblade.net>2025-10-15 19:32:21 -0700
commit55bcdf37342d782c723166de54ff031d09b1281f (patch)
tree11a95bfb390ba6f73e122a17fe0a00312f25dc78 /src/framebuffer.h
parentc099bcb7402421985e6e8c025e8cde591eaa073a (diff)
Clear framebuffer to pink
Diffstat (limited to 'src/framebuffer.h')
-rw-r--r--src/framebuffer.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/framebuffer.h b/src/framebuffer.h
index d2d57cd..b44fa44 100644
--- a/src/framebuffer.h
+++ b/src/framebuffer.h
@@ -3,5 +3,22 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include <stdint.h> 4#include <stdint.h>
5 5
6typedef uint8_t Channel;
7
8typedef struct Pixel {
9 Channel r, g, b;
10} Pixel;
11
12typedef struct Framebuffer {
13 Pixel* pixels;
14 uint32_t size;
15 uint32_t width;
16 uint32_t height;
17 uint32_t depth;
18} Framebuffer;
19
6bool framebuffer_init(uint32_t* error); 20bool framebuffer_init(uint32_t* error);
21const Framebuffer* framebuffer_get();
22void framebuffer_present(const Pixel* pixels);
23void framebuffer_clear(Pixel colour);
7 24