// 1.最上面一行是指的当前场景的渲染批次。(简单理解为需要渲染多少个贴图出来) // 2.中间一行是渲染每一帧需要的时间。 // 3.最下行就是大家熟悉的FPS。 bool AppDelegate::applicationDidFinishLaunching() { // initialize director CCDirector *pDirector = CCDirector::sharedDirector(); pDirector->setOpenGLView(CCEGLView::sharedOpenGLView()); CCSize screenSize = CCEGLView::sharedOpenGLView()->getFrameSize(); CCSize designSize = CCSizeMake(480, 320); if (screenSize.height > 320) { CCSize resourceSize = CCSizeMake(960, 640); CCFileUtils::sharedFileUtils()->setResourceDirectory("hd"); pDirector->setContentScaleFactor(resourceSize.height/designSize.height); } CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height,kResolutionNoBorder); // pDirector->setDisplayStats(true);//设置false 就会显示了 // set FPS. the default value is 1.0/60 if you don't call this pDirector->setAnimationInterval(1.0 / 60); CCScene * pScene = CCScene::create(); CCLayer * pLayer = new TestController(); pLayer->autorelease(); pScene->addChild(pLayer); pDirector->runWithScene(pScene); return true; } 想要往下看的话 void showStats(); void calculateMPF() 可以看看这些方法 CCLabelTTF *m_pFPSLabel; CCLabelTTF *m_pSPFLabel; CCLabelTTF *m_pDrawsLabel;