A sdl wrapper library organized as header files. Work in progress, any forms of contribution are welcome.
- Wrapper classes using RAII
- Wrapper classes use conversion operators so they can be used in vanilla SDL functions
- Functions that works on an object become members of the corresponding class
e.g.
SDL_RendererClear
can be called like this:r.clear()
wherer
is an instance of the classSDL::Renderer
(member functions use lowercase with underscores as a naming policyobject.long_func_name
) - Global functions e.g.
SDL_Delay
are now in namespace and can be accessed like that:SDL::Delay
(case is the sameSDL::DoSomethingUseful
) - All functions inlined
- Custom error handling with functors accepted by overloaded functions functor is an object with an overloaded operator()()
- Default error handlers
- Download or clone
#include
"sdl_wrapper.h"
,"sdl_image.h"
etc.- Add
include/
to your compiler include path, e.g.g++ test.cpp -Iinclude
- Compile