Create window

Program creates an OpenGL window that can be resized or go fullscreen. Nothing drawn inside the window yet.
This commit is contained in:
var
2026-03-29 22:48:55 -05:00
parent 72d68ffa91
commit 9a61a71b09
3 changed files with 126 additions and 1 deletions

View File

@@ -1,6 +1,29 @@
#include <stdio.h>
#include "SDL2/SDL.h"
#include "SDL2/SDL_timer.h"
#include "game.h"
int main(int argc, char* argv[])
{
printf("Hello World!\n");
printf("Starting...\n");
GameState *gs = Game_New();
if (gs == NULL)
{
printf("Failed to start.\n");
return 1;
}
while (gs->running)
{
Game_Update(gs);
SDL_Delay(100);
}
printf("Shutting down...\n");
Game_Destroy(gs);
SDL_Quit();
printf("Done.\n");
return 0;
}