|
SDL3pp
A slim C++ wrapper for SDL3
|
A Resource is a type where its memory is controlled by SDL, usually with functions like SDL_Create*() and SDL_Destroy*().
To represent this type, we create RAII class where the Create* functions become its constructors and the Destroy is called by the destructor. Special *Ref exist to ease the use and allow flexibility on lifetime handling. Eg, for refcount'ed structs like SDL_Surface we get:
For an opaque or non-refcounted type such as SDL_Window e get: