SDL2 development library wrapper for Elixir empowered by NIFs
This library is the second iteration of my sdl bindings attempt.
To compile NIFs and launch example programs, run:
$ mix do deps.get, compile
$ iex -S mix
followed by:
iex> Sdl.Examples.Image.run("/full/path/to/a/picture.png")
or:
iex> Sdl.Examples.Simple.run()
Window with an image should appear in the first case. In the second one you should see regular
window with a pleasant bluish colour. If you ran second example, you also can close the window by
pressing q
.
name, arity notes
SDL_Init
, 1SDL_InitSubSystem
, 1SDL_QuitSubSystem
, 1SDL_WasInit
, 1SDL_Quit
, 0SDL_CreateRgbSurface
, 8SDL_CreateRgbSurfaceWithFormat
, 5SDL_CreateRgbSurfaceFrom
, 9SDL_CreateRgbSurfaceWithFormatFrom
, 6SDL_FreeSurface
, 1SDL_SetSurfacePalette
, 2SDL_LockSurface
, 1SDL_UnlockSurface
, 1SDL_LoadBmpRW
, 2SDL_LoadBmp
, 1SDL_SaveBmpRW
, 3SDL_SaveBmp
, 2SDL_SetSurfaceRLE
, 2SDL_HasSurfaceRLE
, 1SDL_SetColorKey
, 3SDL_HasColorKey
, 1SDL_GetColorKey
, 1 instead of 2SDL_SetSurfaceColorMod
, 4SDL_GetSurfaceColorMod
, 1 instead of 4SDL_SetSurfaceAlphaMod
, 2SDL_GetSurfaceAlphaMod
, 1 instead of 2SDL_SetSurfaceBlendMode
, 2SDL_GetSurfaceBlendMode
, 1 instead of 2SDL_UpperBlit
, 4SDL_GetVideoDriver
, 1SDL_VideoInit
, 1SDL_CreateWindow
, 6SDL_GetWindowSurface
, 1SDL_DestroyWindow
, 1SDL_CreateRenderer
, 3SDL_CreateTextureFromSurface
, 2IMG_Load
, 1SDL_QueryTexture
, 1 instead of 5SDL_RenderClear
, 1SDL_RenderCopy
, 4SDL_RenderPresent
, 1SDL_PollEvent
, 0 instead of 1SDL_DestroyTexture
, 1SDL_DestroyRenderer
, 1SDL_SetRenderDrawColor
, 5SDL_Delay
, 1