SDL2 bindings for Elixir (NIFs)
- refresh on NIFs
- research on SDL library
- MVP with window showed
- unify error handling in NIFs
- add helper functions into
Sexdl.Video
forSDL_WindowFlags
enum values - make NIFs compilation process easier
- fix
sdl_convert_surface_nif
to accept same params as API function - look into
enif_alloc_resource
more and decide how to handle pointers - separate
SDL2/SDL_video.h
functions intoSexdl.Video
module (maybe?) - return map from
new
function insdl_event.c
- fix
elixir actions
To compile NIFs and launch sanity test program, run:
$ mix do deps.get, compile
$ iex -S mix
followed by:
iex> Sexdl.Mvp.run(~c"title")
Black window should appear for about 3 seconds.
You also can run:
iex> Sexdl.Mvp.run(~c"title", ~c"priv/test.png")
And you should see an owl on black background for the same time span:).
SDL_Init
SDL_CreateWindow
SDL_GetWindowSurface
SDL_UpdateWindowSurface
SDL_BlitSurface
SDL_FreeSurface
SDL_DestroyWindow
SDL_Quit
SDL_PollEvent
IMG_Init
IMG_Load
IMG_Quit
SDL_ConvertSurface
partially (see TODO list)