多次调用SDL_SetVideoMode

时间:2010-07-16 08:33:00

标签: c++ sdl surface

可以执行以下操作吗?

SDL_Surface* screen;
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE | SDL_RESIZABLE | SDL_FULLSCREEN );
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE | SDL_RESIZABLE );
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE | SDL_RESIZABLE | SDL_FULLSCREEN );

每次通话前我都不需要清理表面?

1 个答案:

答案 0 :(得分:1)

在Windows上切换全屏的唯一方法是再次调用SDL_SetVideoMode。你不必释放屏幕表面。

小心,您可能会丢失硬件表面。