Wiki Page Content

Differences between revisions 7 and 8
Revision 7 as of 2010-05-08 22:15:59
Size: 2188
Editor: SheenaSmith
Comment: add introduction content
Revision 8 as of 2010-06-24 22:08:54
Size: 1530
Editor: SheenaSmith
Comment: update formatting
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
<<Color2(green, Which header sizes are preferable? I'm partial to the larger 2. Would have to be to use a ToC properly - see below.)>> = Initialization & Shutdown =
Line 9: Line 9:
= Initialization & Shutdown (SDL.h) =
== Initialization & Shutdown (SDL.h) ==
'''Include File(s):''' [[http://hg.libsdl.org/SDL/file/68dfd6df47da/include/SDL.h|SDL.h]]
Line 12: Line 11:
This is the main include header for the SDL library. <<TableOfContents()>>

== Introduction ==
Line 18: Line 19:
<<Color2(green, Do you want a ToC on these pages now that there is more content than just the functions or will the intro material be so short that it is not necessary? This page shows the heading size differences to choose from. Also possible alternative wording for headings - not so sure of those. Need to use two intro headings because this has separate init and shut down sections in one header?)>> === Introduction to Initialization ===
Line 20: Line 21:
<<TableOfContents()>>

== Introduction to Initialization ==
(header to be used w/ ToC)

__Initialization__<<BR>>
Line 27: Line 22:
 {i} The [[CategoryEvents|Event Handling]], [[CategoryIO|File I/O]], and [[CategoryThread|Threading]] subsystems are initialized by default. To initialize other subsystems you must specifically call them. Multiple subsystems may be or'd together.  {i} The [[CategoryEvents|Event Handling]], [[CategoryIO|File I/O]], and [[CategoryThread|Threading]] subsystems are initialized by default. To initialize other subsystems you must specifically call them. Multiple subsystems may be OR'd together.
Line 34: Line 29:
== Introduction to Shut Down ==
(header to be used w/ ToC)
=== Introduction to Shut Down ===
Line 37: Line 31:
__Shut Down__<<BR>>
Line 42: Line 35:
=== Functions ===

DRAFT

Initialization & Shutdown

Include File(s): SDL.h

Introduction

Functions in this category are used to set up SDL 1.3 for use and generally have global effects in your program.

As of version 0.5, SDL is loaded dynamically into the application.

Introduction to 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.

Introduction to 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


CategoryCategory

None: CategoryInit (last edited 2016-03-27 21:42:54 by PhilippWiesemann)

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