diff options
Diffstat (limited to 'src/framebuffer.h')
-rw-r--r-- | src/framebuffer.h | 17 |
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 | ||
6 | typedef uint8_t Channel; | ||
7 | |||
8 | typedef struct Pixel { | ||
9 | Channel r, g, b; | ||
10 | } Pixel; | ||
11 | |||
12 | typedef struct Framebuffer { | ||
13 | Pixel* pixels; | ||
14 | uint32_t size; | ||
15 | uint32_t width; | ||
16 | uint32_t height; | ||
17 | uint32_t depth; | ||
18 | } Framebuffer; | ||
19 | |||
6 | bool framebuffer_init(uint32_t* error); | 20 | bool framebuffer_init(uint32_t* error); |
21 | const Framebuffer* framebuffer_get(); | ||
22 | void framebuffer_present(const Pixel* pixels); | ||
23 | void framebuffer_clear(Pixel colour); | ||
7 | 24 | ||