Skip to content

Instantly share code, notes, and snippets.

@grondilu
Created February 19, 2015 21:09
Show Gist options
  • Save grondilu/ef216b34bb650e8dd283 to your computer and use it in GitHub Desktop.
Save grondilu/ef216b34bb650e8dd283 to your computer and use it in GitHub Desktop.
simple window creation with SDL2
#include <stdio.h>
#include <SDL2/SDL.h>
int main(int argc, char *argv[]) {
SDL_Window *window;
printf("initializing SDL... %d\n", SDL_Init(SDL_INIT_VIDEO));
window = SDL_CreateWindow(
"my window",
0, 0,
320, 240,
SDL_WINDOW_SHOWN
);
sleep(10);
SDL_Quit();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment