Skip to content
Snippets Groups Projects
sdl2.h 464 B
Newer Older
Arnaud Albiez's avatar
Arnaud Albiez committed
#pragma once
#include <SDL2/SDL.h>
Arnaud Albiez's avatar
Arnaud Albiez committed
typedef struct SDLContext {
  SDL_Window *window;
  SDL_Renderer *renderer;
  int width;
  int height;
} SDLContext;
Arnaud Albiez's avatar
Arnaud Albiez committed
/* @brief 
 * Initialise une variable global `context` de type SDLContext
 *
 * Si il y a erreur pendant l'intialisation:
 *  context.window = NULL
 *  ou 
 *  context.renderer = NULL
 *
 * Les deux cas sont à testé !
 * 
 */
void sdl_init();
Arnaud Albiez's avatar
Arnaud Albiez committed
/**
 * nettoie la variable global context 
 */
void sdl_quit();