From 7eeea9c1f23ef50b3cf42136013578e6be6de005 Mon Sep 17 00:00:00 2001 From: Joey Date: Mon, 27 Apr 2020 14:24:26 -0600 Subject: [PATCH] Update README.md --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e482ef..3ba935c 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file +See the [SDL2 docs](https://wiki.libsdl.org/) for more information.