blob: b44fa44c7d9c1dcd65d832594cae4eeb0fc682d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include <stdbool.h>
#include <stdint.h>
typedef uint8_t Channel;
typedef struct Pixel {
Channel r, g, b;
} Pixel;
typedef struct Framebuffer {
Pixel* pixels;
uint32_t size;
uint32_t width;
uint32_t height;
uint32_t depth;
} Framebuffer;
bool framebuffer_init(uint32_t* error);
const Framebuffer* framebuffer_get();
void framebuffer_present(const Pixel* pixels);
void framebuffer_clear(Pixel colour);
|