SDL3pp
A slim C++ wrapper for SDL3
|
Initialize the SDL library. More...
Public Member Functions | |
template<class... FLAGS> | |
SDL (FLAGS... flags) | |
Init given subsystems. | |
constexpr | SDL ()=default |
Default ctor. | |
SDL (const SDL &other)=delete | |
constexpr | SDL (SDL &&other) |
Move ctor. | |
SDL & | operator= (SDL rhs) |
Assignment operator. | |
bool | release () |
release locking such as reset() does, but never calls SDL_Quit() or SDL_QuitSubSystem() | |
bool | reset () |
reset the value of this instance, acts like it was destroyed and then newly instantiated with empty ctor | |
operator bool () const | |
returns true if active and has no errors | |
Also init any subsystem passed as InitFlags
This might be called multiple times, it keeps a ref count and calls SDL_Quit only on the last one.
The SubSystems are out of the refCount, as SDL itself already keep track internally.
|
inline |
flags | subsystem initialization flags. |
This class must have only a single initialized instance at any given time, as it will call Quit() when goes out of scope.
|
constexprdefault |
Useful if you plan to create it afterwards
|
inline |
When this returns true it is safe to call Quit() directly
|
inline |