Split framebuffer functions into library
This commit is contained in:
1 parent
576a32d92f
commit
6c36d3dd40
11 files changed
+223
-176
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t bpp;
|
||||
uint32_t pitch;
|
||||
void *addr;
|
||||
void *buffer;
|
||||
size_t size;
|
||||
} gfx_context;
|
||||
|
||||
#define RGB(r, g, b) (((uint32_t) (r<<16) + (g<<8) + (b)))
|
||||
|
||||
void putpixel(gfx_context *ctx, uint64_t x, uint64_t y, uint32_t clr);
|
||||
void putCharacter(gfx_context *ctx, uint64_t x, uint64_t y, uint32_t clr_fg, uint32_t clr_bg, char c);
|
||||
void flip(gfx_context *ctx);
|
||||
gfx_context *framebuffer_make_subcontext(gfx_context *ctx, uint64_t x, uint64_t y, uint64_t width, uint64_t height);
|
||||
Reference in new issue
Block a user