Thanks for reply Dot ..this is what I expect from the cocos2dx , btw I am using 2.1.4 version which one you are using ?
here is the code in AppDelagate, what I am doing wrong ?
// initialize director
CCDirector pDirector = CCDirector::sharedDirector;
CCEGLView pEGLView = CCEGLView::sharedOpenGLView();
// turn on display FPS
// set FPS. the default value is 1.0/60 if you don’t call this
CCSize screenSize = pEGLView~~>getFrameSize();
float screenRatio = screenSize.height/screenSize.width;
if (screenSize.width > 768)
else if (screenSize.width > 320)
if (screenRatio 1.5f)
designSize = CCSize(640,960);
else if(screenRatio 1.775f)
designSize = CCSize(640,1136);
//designSize = CCSize(768,1024);
designSize = CCSize(320,480);
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, kResolutionExactFit);
// create a scene. it’s an autorelease object
CCScene *pScene = MainMenu::scene;
I have not set one design size for all devices opposed to what is suggested in the WIKI but according to the my resources I have to set them for each device .