您的位置:首页 > 其它

SDL2.0多分屏显示

2015-08-20 11:01 302 查看
参考http://blog.csdn.net/leixiaohua1020/article/details/38868499

SDL_Rect用于确定SDL_Texture显示的位置。一个SDL_Texture可以指定多个不同的SDL_Rect.

SDL_Rect sdlRect;

sdlRect.x=0;

sdlRect.y=0;

sdlRect.w=screen_w;

sdlRect.h=screen_h;

SDL_Rect sdlRect2;

sdlRect2.x = screen_w; //此处确定第二分屏显示位置

sdlRect2.y = 0;

sdlRect2.w = screen_w;

sdlRect2.h = screen_h;

SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, &sdlRect);

SDL_RenderCopy( sdlRenderer, sdlTexture, NULL, &sdlRect2 );
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: