summaryrefslogtreecommitdiff
path: root/src/framebuffer.h
diff options
context:
space:
mode:
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