4 >SDL_SetVideoMode
</TITLE
7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE=
"SDL Library Documentation"
11 HREF=
"index.html"><LINK
14 HREF=
"video.html"><LINK
16 TITLE=
"SDL_VideoModeOK"
17 HREF=
"sdlvideomodeok.html"><LINK
19 TITLE=
"SDL_UpdateRect"
20 HREF=
"sdlupdaterect.html"></HEAD
31 SUMMARY=
"Header navigation table"
40 >SDL Library Documentation
</TH
48 HREF=
"sdlvideomodeok.html"
62 HREF=
"sdlupdaterect.html"
73 NAME=
"SDLSETVIDEOMODE"
83 >SDL_SetVideoMode
--
Set up a video mode with the specified width, height and bits-per-pixel.
</DIV
85 CLASS=
"REFSYNOPSISDIV"
99 CLASS=
"FUNCSYNOPSISINFO"
100 >#include
"SDL.h"</PRE
109 >(int width, int height, int bpp, Uint32 flags);
</CODE
123 >Set up a video mode with the specified width, height and bits-per-pixel.
</P
130 > is
0, it is treated as the
131 current display bits per pixel.
</P
138 > parameter is the same as the
<TT
144 HREF=
"sdlsurface.html"
149 > structure. OR'd combinations of the following values are valid.
</P
151 CLASS=
"INFORMALTABLE"
172 >Create the video surface in system memory
</TD
185 >Create the video surface in video memory
</TD
198 >Enables the use of asynchronous updates of the display surface. This will
199 usually slow down blitting on single CPU machines, but may provide a speed
200 increase on SMP systems.
</TD
213 >Normally, if a video surface of the requested bits-per-pixel (
<TT
218 >) is not available, SDL will emulate one with a shadow surface. Passing
<TT
221 > prevents this and causes SDL to use the video surface, regardless of its pixel depth.
</TD
234 >Give SDL exclusive palette access. Without this flag you may not always get the the colors you request with
<A
235 HREF=
"sdlsetcolors.html"
241 HREF=
"sdlsetpalette.html"
259 >Enable hardware double buffering; only valid with SDL_HWSURFACE. Calling
267 buffers and update the screen. All drawing will take place on the surface
268 that is not displayed at the moment. If double buffering could not be enabled
272 > will just perform a
274 HREF=
"sdlupdaterect.html"
280 on the entire screen.
</TD
293 >SDL will attempt to use a fullscreen mode. If a hardware resolution change is
294 not possible (for whatever reason), the next higher resolution will be used and
295 the display window centered on a black background.
</TD
308 >Create an OpenGL rendering context. You should have previously set OpenGL video attributes with
<A
309 HREF=
"sdlglsetattribute.html"
312 >SDL_GL_SetAttribute
</TT
327 >Create an OpenGL rendering context, like above, but allow normal blitting
328 operations. The screen (
2D) surface may have an alpha channel, and
330 HREF=
"sdlupdaterects.html"
336 must be used for updating changes to the screen surface. NOTE: This option
337 is kept for compatibility only, and is
<SPAN
357 >Create a resizable window. When the window is resized by the user a
<A
358 HREF=
"sdlresizeevent.html"
363 > event is generated and
<TT
365 >SDL_SetVideoMode
</TT
366 > can be called again with the new size.
</TD
382 > causes SDL to create a window with no title bar or frame decoration. Fullscreen modes automatically have this flag set.
</TD
403 >SDL_SetVideoMode
</TT
404 > could satisfy are set in the
<TT
409 > member of the returned surface.
</P
424 > parameter is the number of bits per pixel,
430 > of
24 uses the packed representation of
431 3 bytes/pixel. For the more common
4 bytes/pixel mode, use a
437 > of
32. Somewhat oddly, both
15 and
16 will
438 request a
2 bytes/pixel mode, but different pixel formats.
</P
450 >The framebuffer surface, or
<SPAN
454 The surface returned is freed by SDL_Quit() and should nt be freed by
466 HREF=
"sdllocksurface.html"
473 HREF=
"sdlsetcolors.html"
487 HREF=
"sdlsurface.html"
499 SUMMARY=
"Footer navigation table"
510 HREF=
"sdlvideomodeok.html"
528 HREF=
"sdlupdaterect.html"