Update README.md

This commit is contained in:
Joey 2020-04-27 14:24:26 -06:00 • committed by GitHub
commit 7eeea9c1f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,28 @@ Bindings are autogenerated at compile time and all related libraries are downloa
nimble install nim_sdl2
```
## Usage
Examples are coming. To import (and use all libs except sdl2_gpu), use
```nim
import sdl2
import sdl2 / sdl2_gpu
```
If you want to only use specific libs, import individually:
```nim
import sdl2 / sdl2
import sdl2 / sdl2_image
import sdl2 / sdl2_ttf
import sdl2 / sdl2_net
import sdl2 / sdl2_mixer
import sdl2 / sdl2_gfx
import sdl2 / sdl2_gpu
```
## Configuration
This project uses [nimterop](https://github.com/nimterop/nimterop) to generate it's bindings and documentation.
@ -33,4 +55,4 @@ 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.
See the [SDL2 docs](https://wiki.libsdl.org/) for more information.