This repository has been archived on 2022-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
DemoGL4D/window.c

38 lines
827 B
C

#include <GL4D/gl4duw_SDL2.h>
#include "includes/animations.h"
// Dimensions initiales de la fenêtre
static int dimensions[] = {1280, 720};
// Animations
static GL4DHanime animations[] = {
{0, NULL, NULL, NULL}
};
// Comportement à la fermeture du programme
static void fermeture(void);
// Comportement au démarrage du programme
void initialisation(void);
int main(int argc, char *argv[]) {
if(!gl4duwCreateWindow(argc, argv, "Démo Anri KENNEL", 10, 10, dimensions[0], dimensions[1], GL4DW_SHOWN)) {
return 1;
}
initialisation();
atexit(fermeture);
gl4duwDisplayFunc(gl4dhDraw);
gl4duwMainLoop();
return 0;
}
void initialisation(void) {
gl4dhInit(animations, dimensions[0], dimensions[1], initialisationAnimation);
}
void fermeture(void) {
gl4duClean(GL4DU_ALL);
}