diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2019-09-01 21:54:50 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2019-09-01 21:54:50 +0200 |
commit | 235cbc46a64ac63fd53df8a39a8681a8fcea2848 (patch) | |
tree | 3d792f5e4a1bb7f8054948b74b389be1a128b342 /src/main.h | |
download | demoscene-eo-235cbc46a64ac63fd53df8a39a8681a8fcea2848.tar.gz demoscene-eo-235cbc46a64ac63fd53df8a39a8681a8fcea2848.tar.bz2 demoscene-eo-235cbc46a64ac63fd53df8a39a8681a8fcea2848.zip |
Initial import. First working main loop.
Switching from scene to scene is done.
Loading image to SDL, download SDL texture from VRAM to RAM is done.
caca background from SDL texture is "done".
GL drawing is not yet tried. Considering OpenGL3 + shaders.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000..b2b0a6e --- /dev/null +++ b/src/main.h @@ -0,0 +1,23 @@ +#ifndef MAIN_H_INCLUDED +#define MAIN_H_INCLUDED + +#include <caca.h> +#include <SDL2/SDL.h> +#include <SDL2/SDL_opengl.h> +#include <GL/glu.h> + +typedef struct { + caca_display_t *dp; + caca_canvas_t *cv; + caca_dither_t *d; + int w, h; // caca terminal size in characters + SDL_Window* sdl_win; + SDL_Renderer *sdl_rndr; + SDL_Texture *sdl_target; + void *raw_target; + SDL_GLContext gl_ctx; + Uint32 sdl_ticks; + Uint32 framecount; + Uint32 sc_framecount; +} graphical_env_t; +#endif |