Merge everything in main()
This commit is contained in:
parent
ceeb9bada2
commit
907ed3c174
1 changed files with 15 additions and 15 deletions
30
window.c
30
window.c
|
@ -2,23 +2,27 @@
|
||||||
|
|
||||||
#include "includes/animations.h"
|
#include "includes/animations.h"
|
||||||
|
|
||||||
int dimensions[] = {1280, 720};
|
|
||||||
|
|
||||||
// Animations
|
|
||||||
GL4DHanime animations[] = {
|
|
||||||
{ 5000, cube, NULL, NULL },
|
|
||||||
{ 2500, cube, voronoi, fondu },
|
|
||||||
{ 5000, voronoi, NULL, NULL },
|
|
||||||
{ 0, NULL, NULL, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
// Comportement à la fermeture du programme
|
// Comportement à la fermeture du programme
|
||||||
void fermeture(void);
|
void fermeture(void) {
|
||||||
|
gl4duClean(GL4DU_ALL);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
// Dimensions initiales de la fenêtre
|
||||||
|
int dimensions[] = { 1280, 720 };
|
||||||
|
|
||||||
if(!gl4duwCreateWindow(argc, argv, "Démo Anri KENNEL", 10, 10, dimensions[0], dimensions[1], GL4DW_SHOWN)) {
|
if(!gl4duwCreateWindow(argc, argv, "Démo Anri KENNEL", 10, 10, dimensions[0], dimensions[1], GL4DW_SHOWN)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Animations
|
||||||
|
GL4DHanime animations[] = {
|
||||||
|
{ 5000, cube, NULL, NULL },
|
||||||
|
{ 5000, voronoi, NULL, NULL },
|
||||||
|
{ 5000, polygone, NULL, NULL },
|
||||||
|
{ 0, NULL, NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
gl4dhInit(animations, dimensions[0], dimensions[1], NULL);
|
gl4dhInit(animations, dimensions[0], dimensions[1], NULL);
|
||||||
atexit(fermeture);
|
atexit(fermeture);
|
||||||
|
|
||||||
|
@ -27,7 +31,3 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fermeture(void) {
|
|
||||||
gl4duClean(GL4DU_ALL);
|
|
||||||
}
|
|
||||||
|
|
Reference in a new issue