如下设置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笔记(https://www.geekapp.cn/)。