Manpage of SDL_SetVideoMode
SDL_SetVideoMode- Set up a video mode with the specified width, height and bits-per-pixel&.
fBSDL_Surface *fBSDL_SetVideoModefPfR(fBint width, int height, int bpp, Uint32 flagsfR);
Set up a video mode with the specified width, height and bits-per-pixel&.
If fBbppfR is 0, it is treated as the current display bits per pixel&.
The fBflagsfR parameter is the same as the fBflagsfR field of the fIfBSDL_SurfacefRfR structure&. OR&'d combinations of the following values are valid&.
Create the video surface in system memory
Create the video surface in video memory
Enables the use of asynchronous updates of the display surface&. This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems&.
Normally, if a video surface of the requested bits-per-pixel (fBbppfR) is not available, SDL will emulate one with a shadow surface&. Passing fBSDL_ANYFORMATfP prevents this and causes SDL to use the video surface, regardless of its pixel depth&.
Give SDL exclusive palette access&. Without this flag you may not always get the the colors you request with fIfBSDL_SetColorsfPfR or fIfBSDL_SetPalettefPfR&.
Enable hardware double buffering; only valid with SDL_HWSURFACE&. Calling fIfBSDL_FlipfPfR will flip the buffers and update the screen&. All drawing will take place on the surface that is not displayed at the moment&. If double buffering could not be enabled then fBSDL_FlipfP will just perform a fIfBSDL_UpdateRectfPfR on the entire screen&.
SDL will attempt to use a fullscreen mode&. If a hardware resolution change is not possible (for whatever reason), the next higher resolution will be used and the display window centered on a black background&.
Create an OpenGL rendering context&. You should have previously set OpenGL video attributes with fIfBSDL_GL_SetAttributefPfR&.
Create an OpenGL rendering context, like above, but allow normal blitting operations&. The screen (2D) surface may have an alpha channel, and fIfBSDL_UpdateRectsfPfR must be used for updating changes to the screen surface&.
Create a resizable window&. When the window is resized by the user a fIfBSDL_VIDEORESIZEfPfR event is generated and fBSDL_SetVideoModefP can be called again with the new size&.
If possible, fBSDL_NOFRAMEfP causes SDL to create a window with no title bar or frame decoration&. Fullscreen modes automatically have this flag set&.
Whatever fBflagsfR fBSDL_SetVideoModefP could satisfy are set in the fBflagsfR member of the returned surface&.
The fBbppfR parameter is the number of bits per pixel, so a fBbppfR of 24 uses the packed representation of 3 bytes/pixel&. For the more common 4 bytes/pixel mode, use a fBbppfR of 32&. Somewhat oddly, both 15 and 16 will request a 2 bytes/pixel mode, but different pixel formats&.
The framebuffer surface, or fBNULLfR if it fails&. The surface returned is freed by SDL_Quit() and should nt be freed by the caller&.
fIfBSDL_LockSurfacefPfR, fIfBSDL_SetColorsfPfR, fIfBSDL_FlipfPfR, fIfBSDL_SurfacefRfR
- RETURN VALUE
- SEE ALSO