Wiki Page Content

Revision 3 as of 2010-05-06 19:55:47

Clear message

green

Initialization & Shutdown (SDL.h)

Initialization & Shutdown (SDL.h)

Initialization
To begin using SDL in your program SDL_Init() must be called to initialize subsystems and enable use of other SDL functions.

  • {i} The Event Handling, File I/O, and Threading subsystems are initialized by default. To initialize other subsystems you must specifically call them. Multiple subsystems may be or'd together.

  • Example:

    • SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO);
    • Initializes the 3 default subsystems plus the Video and Audio subsystems.

Shut Down
SDL_Quit() should be called before an SDL application exits to shut down all subsystems, including the default ones.

  • It is not necessary to specify individual subsystems when using SDL_Quit(). It will automatically shut down all active subsystems.

Functions

Functions


CategoryCategory

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit