Skip to content
Snippets Groups Projects
Commit c268e6b7 authored by tanguy.cavagna's avatar tanguy.cavagna :desktop:
Browse files

Blank window of gfx

parent 364de7fc
Branches
Tags
No related merge requests found
main.c 0 → 100644
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include "gfx.h"
int main(void) {
const int WINDOW_SIZE_X = 500;
const int WINDOW_SIZE_Y = 500;
srand(time(NULL));
struct gfx_context_t *ctxt = gfx_create("draw", WINDOW_SIZE_X, WINDOW_SIZE_Y);
if (!ctxt) {
fprintf(stderr, "Graphics initialization failed !\n");
return EXIT_FAILURE;
}
while (gfx_keypressed() != SDLK_ESCAPE){
gfx_present(ctxt);
}
gfx_destroy(ctxt);
return EXIT_SUCCESS;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment