Method SDL.set_video_mode()


Method set_video_mode

object set_video_mode(int width, int height, int bpp, int flags)

Description

Sets up a video mode with the specified width, height and bits per pixel.

Parameter width

The desired width. Setting this to <= 0 results in an SDL error.

Parameter height

The desired height. Setting this to <= 0 results in an SDL error.

Parameter bpp

The bits per pixel. This should be either 0, 8, 16, 24 or 32. If you set this to 0, the bits-per-pixel value of the current display will be used.

Parameter flags

An OR'd combination of the desired SDL.Surface flags.

Returns

The framebuffer surface. An error is thrown if the video mode can't be set.

See also

SDL.Surface, SDL.video_mode_ok()