aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/framebuffer.hpp
blob: 4f5e0c1120ea61af79df9481d423603f9838a45d (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
25
26
#pragma once

#include "boucane.hpp"

typedef struct {
    u32 pitch;
    u32 depth;
    u64 location;
    u32 width;
    u32 height;
} __attribute__((packed)) FB_CFG;

typedef struct {
    u32 x,y;
    u8 r,g,b,a;
} __attribute__((packed)) FB_PIXEL;

extern FB_CFG fb_cfg;

void framebuffer_init(FB_CFG config);

void framebuffer_draw(FB_PIXEL p);

void framebuffer_scrollup(u32 npixel);

void framebuffer_clear();