Penguin

SDL_!SetVideoMode?

SDL_!SetVideoMode?

NAME SYNOPSIS DESCRIPTION RETURN VALUE SEE ALSO


NAME

SDL_!SetVideoMode?- Set up a video mode with the specified width, height and bits-per-pixel.

SYNOPSIS

#include

SDL_Surface *SDL_!SetVideoMode?(int width, int height, int bpp, Uint32 flags);

DESCRIPTION

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

If bpp is 0, it is treated as the current display bits per pixel.

The flags parameter is the same as the flags field of the SDL_Surface structure. OR'd combinations of the following values are valid.

SDL_SWSURFACE

Create the video surface in system memory

SDL_HWSURFACE

Create the video surface in video memory

SDL_ASYNCBLIT

Enables the use of asynchronous to the display surface. This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.

SDL_ANYFORMAT

Normally, if a video surface of the requested depth (bpp) is not available, SDL will emulate one with a shadow surface. Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its depth.

SDL_HWPALETTE

Give SDL exclusive palette access. Without this flag you may not always get the the colors you request with SDL_!SetColors?.

SDL_DOUBLEBUF

Enable double buffering. Calling SDL_Flip will flip the buffers and update the screen. If double buffering could not be enabled then SDL_Flip will just perform a SDL_!UpdateRect? on the entire screen.

SDL_FULLSCREEN

SDL will attempt to use a fullscreen mode

SDL_OPENGL Create an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL_GL_!SetAttribute?.

SDL_OPENGLBLIT

Create an OpenGL rendering context, like above, but allow normal blitting operations.

SDL_RESIZABLE

Create a resizable window. When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL_!SetVideoMode? can be called again with the new size.

Note:

Whatever flags SDL_!SetVideoMode? could satisfy are set in the flags member of the returned surface.

RETURN VALUE

The framebuffer surface, or NULL if it fails.

SEE ALSO

SDL_!LockSurface?, SDL_!SetColors?, SDL_Flip, SDL_Surface


This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.