Add main file

This commit is contained in:
Mylloon 2022-05-12 13:48:40 +02:00
parent d53d7b35f9
commit 37dc1ba3de
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

27
window.c Normal file
View 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);
}