diff --git a/README.md b/README.md index 612e72e..6e482ef 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,36 @@ # nim-sdl2 -Autogenerated Nim bindings around SDL2 +Autogenerated Nim bindings around SDL2. These bindings should be complete. + +Bindings are autogenerated at compile time and all related libraries are downloaded and built for you as well. You can specify the version of each SDL2 lib using the information in the Configuration section below. + +## Installation + +``` +nimble install nim_sdl2 +``` + +## Configuration + +This project uses [nimterop](https://github.com/nimterop/nimterop) to generate it's bindings and documentation. + +As such, nimterop provides a nice configuration for choosing which versions of libraries get installed. To do so, create a `nim.cfg` file in your project's root directory (if one doesn't exist), and add the following: + +```cfg +-d:SDL_SetVer="2.0.12" -d:SDL_DL -d:SDL_Static +-d:SDL_ImageSetVer="2.0.5" -d:SDL_Image_DL -d:SDL_Image_Static +-d:SDL_NetSetVer="2.0.1" -d:SDL_Net_DL -d:SDL_Net_Static +-d:SDL_MixerSetVer="2.0.4" -d:SDL_Mixer_DL -d:SDL_Mixer_Static +-d:SDL_ttf_SetVer="2.0.15" -d:SDL_TTF_DL -d:SDL_ttf_Static +-d:SDL_GpuSetVer="def5ea1" -d:SDL_GPU_Git -d:SDL_Gpu_Static +-d:SDL2_GFXPrimitivesSetVer="1.0.4" -d:SDL2_GFXPrimitives_DL -d:SDL2_GFXPrimitives_Static -d:SDL2_GFX_Static +``` + +Change the versions as needed above. `sdl-gpu` is in a git repo, so the version it uses is the commit hash. `SDL2_GFXPrimitives` is `sdl2-gfx`, just the naming is a bit weird. If you want to build a dynamically linked library, remove the `_Static` options above. + +## Documentation + +View autogenerated documentation [here](https://jyapayne.github.io/nim-sdl2). + +All symbols and procedure definitions should be in line with their C counterparts, except with the prefixes removed (GPU_, SDL_, etc). + +See the [SDL2 docs](https://wiki.libsdl.org/) for more information. \ No newline at end of file diff --git a/sdl2.nimble b/nim_sdl2.nimble similarity index 100% rename from sdl2.nimble rename to nim_sdl2.nimble