#ifndef MAIN_H_INCLUDED #define MAIN_H_INCLUDED #define GL_GLEXT_PROTOTYPES #include #include #include #include #define FBUF_W 256 #define FBUF_H 256 typedef struct { // libcaca caca_display_t *dp; caca_canvas_t *cv; caca_dither_t *d; int w, h; // caca terminal size in characters // SDL worker SDL_Window* sdl_win; SDL_Renderer *sdl_rndr; SDL_Texture *sdl_target; // OpenGL worker SDL_Window* gl_win; SDL_GLContext gl_ctx; SDL_Renderer *gl_rndr; SDL_Texture *gl_target; // framebuffer to inject OpenGL or SDL result in caca canvas uint32_t raw_target[FBUF_W*FBUF_H]; // Timing Uint32 sdl_ticks; Uint32 framecount; Uint32 sc_framecount; } graphical_env_t; #endif