summaryrefslogtreecommitdiff
path: root/include/object/framebuffer.h
blob: 6eac7e0998ed07422a59988b4642999e726c21dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

class Framebuffer
{
	public:
		unsigned char *data;

		Framebuffer(unsigned char *data) : data(data) {}

		constexpr static unsigned int const width = CONFIG_framebuffer_width;
		constexpr static unsigned int const height = CONFIG_framebuffer_height;

		void clear();
		void fillBox(unsigned int x, unsigned int y, unsigned int w, unsigned int h);
		void drawAt(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *image);

	private:
		Framebuffer(Framebuffer& copy);
};

extern Framebuffer fb;