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 );
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 );
相关文章推荐
- error C2039: “ReadHuge”: 不是“CFile”的成员
- 设计模式之Proxy模式
- 关于Java特种兵下册
- 【java开发系列】—— 自定义注解(转)
- HDU 5402 Travelling Salesman Problem (MUT#9 暴力模拟)
- POJ--2289--Jamie's Contact Groups【二分图的多个匹配+二分法答案】
- 云存储上传控件更新日志-Xproer.HttpUploader7
- LC.exe exited with code -1
- Yii2的一些问题
- NoSQL数据库种类
- Hibernate统计表中的条数
- 跳跃的舞者,舞蹈链(Dancing Links)算法——求解精确覆盖问题
- ubuntu账户操作
- Hibernate统计表中的条数
- 欢迎使用CSDN-markdown编辑器
- 我的iOS工程结构
- 欢迎使用CSDN-markdown编辑器
- 打包标签库
- hdu1307Hash
- mtd-utils源码官方下载地址