cocos2dx setDesignResolutionSize报错Integer division by zero

如下设置setDesignResolutionSize后报错:

AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("volleyball");
eglView->setFrameSize(800, 480);
eglView->setDesignResolutionSize(800,480,kResolutionShowAll);
return CCApplication::sharedApplication()->run();

修改为以下OK:

AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("volleyball");
eglView->setFrameSize(800, 480);
CCDirector::sharedDirector()->setOpenGLView(eglView);
eglView->setDesignResolutionSize(800,480,kResolutionShowAll);
return CCApplication::sharedApplication()->run();

原创内容转载请保留出处GEEK笔记(http://www.geekapp.cn/)。

原创博客,转载请标明出处:http://www.geekapp.cn/archives/224.html
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇