Add main file
This commit is contained in:
parent
d53d7b35f9
commit
37dc1ba3de
1 changed files with 27 additions and 0 deletions
27
window.c
Normal file
27
window.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <GL4D/gl4dp.h>
|
||||
#include <GL4D/gl4duw_SDL2.h>
|
||||
|
||||
// Dessine dans la fenêtre
|
||||
static void dessin(void);
|
||||
|
||||
// Dimensions initiales de la fenêtre
|
||||
static int dimensions[] = {1280, 720};
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if(!gl4duwCreateWindow(argc, argv, "Démo Anri KENNEL", 10, 10, dimensions[0], dimensions[1], GL4DW_SHOWN)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
gl4dpInitScreen();
|
||||
gl4duwDisplayFunc(dessin);
|
||||
gl4duwMainLoop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dessin(void) {
|
||||
gl4dpClearScreen();
|
||||
|
||||
/* ... */
|
||||
gl4dpUpdateScreen(NULL);
|
||||
}
|
Reference in a new issue