From 37dc1ba3de4559d1b40b6bcd0b459d7fb5772a43 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 12 May 2022 13:48:40 +0200 Subject: [PATCH] Add main file --- window.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 window.c diff --git a/window.c b/window.c new file mode 100644 index 0000000..ff77e9b --- /dev/null +++ b/window.c @@ -0,0 +1,27 @@ +#include +#include + +// 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); +}