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

34 lines
737 B
C
Raw Normal View History

2022-05-12 13:48:40 +02:00
#include <GL4D/gl4duw_SDL2.h>
#include "includes/animations.h"
2022-05-12 13:48:40 +02:00
int dimensions[] = {1280, 720};
2022-05-12 13:48:40 +02:00
2022-05-13 20:57:05 +02:00
// Animations
2022-05-15 21:02:08 +02:00
GL4DHanime animations[] = {
{ 5000, cube, NULL, NULL },
{ 2500, cube, cube2, fondu },
{ 5000, cube2, NULL, NULL },
{ 0, NULL, NULL, NULL }
2022-05-13 20:57:05 +02:00
};
// Comportement à la fermeture du programme
2022-05-15 21:02:08 +02:00
void fermeture(void);
2022-05-13 20:57:05 +02:00
2022-05-12 13:48:40 +02:00
int main(int argc, char *argv[]) {
if(!gl4duwCreateWindow(argc, argv, "Démo Anri KENNEL", 10, 10, dimensions[0], dimensions[1], GL4DW_SHOWN)) {
return 1;
}
gl4dhInit(animations, dimensions[0], dimensions[1], NULL);
2022-05-13 20:57:05 +02:00
atexit(fermeture);
2022-05-12 13:48:40 +02:00
2022-05-13 20:57:05 +02:00
gl4duwDisplayFunc(gl4dhDraw);
2022-05-12 13:48:40 +02:00
gl4duwMainLoop();
return 0;
}
2022-05-13 20:57:05 +02:00
void fermeture(void) {
gl4duClean(GL4DU_ALL);
2022-05-12 13:48:40 +02:00
}