Le bon code pour linux 🐧

This commit is contained in:
Theo 2024-09-05 15:52:41 +02:00
parent 28ce900dc2
commit f35c29f429

16
main.c
View File

@ -1,7 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <windows.h> #include <GL/glut.h>
#include "glut.h"
void afficher(void) void afficher(void)
{ {
@ -23,7 +22,16 @@ void afficher(void)
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
printf("Hello, World!"); glutInit(&argc, argv);
afficher(); glutInitDisplayMode(GLUT_SINGLE|GLUT_RGBA);
int win = glutCreateWindow("glut");
glutDisplayFunc(afficher);
glutMainLoop();
glutDestroyWindow(win);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }