Skip to content

Instantly share code, notes, and snippets.

@tk3
Created January 12, 2021 14:03
Show Gist options
  • Save tk3/15bddac8ab2bb9f1e2a8d1ae74cb17c6 to your computer and use it in GitHub Desktop.
Save tk3/15bddac8ab2bb9f1e2a8d1ae74cb17c6 to your computer and use it in GitHub Desktop.
SDL2 / F#
open MySDL2
[<EntryPoint>]
let main argv =
let SDL_INIT_VIDEO = 0x00000020u
let _ = Api.SDL_Init(SDL_INIT_VIDEO)
let SDL_WINDOWPOS_CENTERED_MASK = 0x2FFF0000
let SDL_WINDOWPOS_CENTERED_DISPLAY x = SDL_WINDOWPOS_CENTERED_MASK ||| x
let SDL_WINDOWPOS_CENTERED = SDL_WINDOWPOS_CENTERED_DISPLAY 0
let _ = Api.SDL_CreateWindow("Game3", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, 0u)
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment