Table of Contents | ||||||||||||||||
|
||||||||||||||||
StartUp | ||||||||||||||||
Purpose Sets up SDL video and the primary surface |
||||||||||||||||
Protoype void CVideo::StartUp (int i_width, int i_height, int i_bpp, Uint32 i_flags, string str_title = "SDL_app", string str_icon = "", bool b_cursor = true) |
||||||||||||||||
Parameters
|
||||||||||||||||
Description This function sets up the SDL video and primary surface. You define the surface dimensions along with the flags that will tell SDL what kind of surface it's dealing with. You can OR any of these following flags together
In addition to the above flags CVideo has three presets: WINDOWED, FULLSCREEN, and SPLASH. The first two are self-explanitory, the third may be a little confusing - it creates a frameless non-fullscreen surface that can be used to display a splash image. After defining the surface dimensions you have the option of setting the caption of the application as well as the icon associated with it. If it is a fullscreen application then neither of these two parameters will apply. The application name will appear in both the application title bar and it's button in the taskbar. The icon must be a 32x32 bitmap file. Lastly, you can enable or disable the system mouse cursor with a flag. To show the cursor, use TRUE, otherwise use FALSE to hide it. If it is a fullscreen application the system cursor will not show regardless. |
||||||||||||||||
Use CVideo video; // create a windowed app video.StartUp(800, 600, 32, WINDOWED, "My App", "app.bmp"); // create a fullscreen app video.StartUp(1024, 768, 32, FULLSCREEEN); |
||||||||||||||||
|
||||||||||||||||
|