设为首页 加入收藏

TOP

Cocos2d-x在运行时候修改分辨率
2014-11-23 20:01:21 】 浏览:359
Tags:Cocos2d-x 运行 时候 修改 分辨率

下面是Cocos2d-x在运行时候修改分辨率:


cocos2d::CCEGLView* eglView = cocos2d::CCEGLView::sharedOpenGLView();
cocos2d::CCDirector* pDirector = cocos2d::CCDirector::sharedDirector();


if ( eglView == NULL || pDirector == NULL )
{
return false;
}


eglView->setFrameSize(width, height);


eglView->setDesignResolutionSize(width, height, kResolutionNoBorder);


cocos2d::CCScene *pScene = HelloWorld::scene();
pDirector->replaceScene(pScene);


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇stl string 的 trim split replac.. 下一篇AngularJS 1.3 提升了 HTML 表单

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目