Function sdl2::init
[−]
[src]
pub fn init() -> InitBuilder
Initializes the SDL library. This must be called before using any other SDL function.
Example
let mut sdl_context = sdl2::init().everything().unwrap(); for event in sdl_context.event_pump().poll_iter() { // ... } // SDL_Quit() is called here as `sdl_context` is dropped.