SDL_SetVideoMode.3
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:4k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- .TH "SDL_SetVideoMode" "3" "Tue 11 Sep 2001, 23:01" "SDL" "SDL API Reference"
- .SH "NAME"
- SDL_SetVideoMode- Set up a video mode with the specified width, height and bits-per-pixel&.
- .SH "SYNOPSIS"
- .PP
- fB#include "SDL&.h"
- .sp
- fBSDL_Surface *fBSDL_SetVideoModefPfR(fBint width, int height, int bpp, Uint32 flagsfR);
- .SH "DESCRIPTION"
- .PP
- Set up a video mode with the specified width, height and bits-per-pixel&.
- .PP
- If fBbppfR is 0, it is treated as the current display bits per pixel&.
- .PP
- The fBflagsfR parameter is the same as the fBflagsfR field of the fIfBSDL_SurfacefRfR structure&. OR&'d combinations of the following values are valid&.
- .TP 20
- fBSDL_SWSURFACEfP
- Create the video surface in system memory
- .TP 20
- fBSDL_HWSURFACEfP
- Create the video surface in video memory
- .TP 20
- fBSDL_ASYNCBLITfP
- 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&.
- .TP 20
- fBSDL_ANYFORMATfP
- 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&.
- .TP 20
- fBSDL_HWPALETTEfP
- Give SDL exclusive palette access&. Without this flag you may not always get the the colors you request with fIfBSDL_SetColorsfPfR or fIfBSDL_SetPalettefPfR&.
- .TP 20
- fBSDL_DOUBLEBUFfP
- 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&.
- .TP 20
- fBSDL_FULLSCREENfP
- 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&.
- .TP 20
- fBSDL_OPENGLfP
- Create an OpenGL rendering context&. You should have previously set OpenGL video attributes with fIfBSDL_GL_SetAttributefPfR&.
- .TP 20
- fBSDL_OPENGLBLITfP
- 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&.
- .TP 20
- fBSDL_RESIZABLEfP
- 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&.
- .TP 20
- fBSDL_NOFRAMEfP
- If possible, fBSDL_NOFRAMEfP causes SDL to create a window with no title bar or frame decoration&. Fullscreen modes automatically have this flag set&.
- .PP
- .RS
- fBNote:
- .PP
- Whatever fBflagsfR fBSDL_SetVideoModefP could satisfy are set in the fBflagsfR member of the returned surface&.
- .RE
- .PP
- .RS
- fBNote:
- .PP
- 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&.
- .RE
- .SH "RETURN VALUE"
- .PP
- The framebuffer surface, or fBNULLfR if it fails&. The surface returned is freed by SDL_Quit() and should nt be freed by the caller&.
- .SH "SEE ALSO"
- .PP
- fIfBSDL_LockSurfacefPfR, fIfBSDL_SetColorsfPfR, fIfBSDL_FlipfPfR, fIfBSDL_SurfacefRfR
- ..." created by instant / docbook-to-man, Tue 11 Sep 2001, 23:01