From d58d959a94f24fa6f496380b1f085cda48560a63 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 2 Jan 2018 00:49:29 -0800 Subject: sdl_fb: implement rudimentary sdl fb backend This uses a simple fixed 640x480 windowed mode (for now). The SDL2 Renderer & Texture API is used for vsync-synchronized presents. There's probably excessive copying going on because the rototiller fb code manages pages and flips but SDL2 doesn't really expose low-level control of such things. This backend is quite useful for development purposes, allowing quick iteration in a windowed environment. Note this is just the backend implementation, it's dormant code but trivially activated. --- src/sdl_fb.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/sdl_fb.h (limited to 'src/sdl_fb.h') diff --git a/src/sdl_fb.h b/src/sdl_fb.h new file mode 100644 index 0000000..4cd0ee9 --- /dev/null +++ b/src/sdl_fb.h @@ -0,0 +1,9 @@ +#ifndef _SDL_FB_H +#define _SDL_FB_H + +typedef struct sdl_fb_t sdl_fb_t; + +sdl_fb_t * sdl_fb_new(); +void sdl_fb_free(sdl_fb_t *fb); + +#endif -- cgit v1.2.3