设为首页 加入收藏

TOP

Cocos2d-x在运行时候修改分辨率
2014-11-23 20:01:21 来源: 作者: 【 】 浏览:33
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 表单

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: