SDL_VideoModeOK.3
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- .TH "SDL_VideoModeOK" "3" "Tue 11 Sep 2001, 23:01" "SDL" "SDL API Reference"
- .SH "NAME"
- SDL_VideoModeOK- Check to see if a particular video mode is supported&.
- .SH "SYNOPSIS"
- .PP
- fB#include "SDL&.h"
- .sp
- fBint fBSDL_VideoModeOKfPfR(fBint width, int height, int bpp, Uint32 flagsfR);
- .SH "DESCRIPTION"
- .PP
- fBSDL_VideoModeOKfP returns fB0fR if the requested mode is not supported under any bit depth, or returns the bits-per-pixel of the closest available mode with the given width, height and requested fIsurfacefR flags (see fIfBSDL_SetVideoModefPfR)&.
- .PP
- The bits-per-pixel value returned is only a suggested mode&. You can usually request and bpp you want when fIsettingfR the video mode and SDL will emulate that color depth with a shadow video surface&.
- .PP
- The arguments to fBSDL_VideoModeOKfP are the same ones you would pass to fISDL_SetVideoModefR
- .SH "EXAMPLE"
- .PP
- .nf
- f(CWSDL_Surface *screen;
- Uint32 bpp;
- &.
- &.
- &.
- printf("Checking mode 640x480@16bpp&.
- ");
- bpp=SDL_VideoModeOK(640, 480, 16, SDL_HWSURFACE);
- if(!bpp){
- printf("Mode not available&.
- ");
- exit(-1);
- }
- printf("SDL Recommends 640x480@%dbpp&.
- ", bpp);
- screen=SDL_SetVideoMode(640, 480, bpp, SDL_HWSURFACE);
- &.
- &.fR
- .fi
- .PP
- .SH "SEE ALSO"
- .PP
- fIfBSDL_SetVideoModefPfR, fIfBSDL_GetVideoInfofPfR
- ..." created by instant / docbook-to-man, Tue 11 Sep 2001, 23:01