Sprites are not scaled when i tried to implement multi resolution.

Hi all,

I tried to implement multi resolution based on setDesignResolutionSize and setContentScaleFactor. I haven’t sprites in different resolutions(Want to try how multi resolution work. Perhaps this the reason of problem.). In AppDelegate.cpp i use this code:

CCDirector pDirector = CCDirector::sharedDirector;
CCEGLView
pEGLView = CCEGLView::sharedOpenGLView();
pDirector~~>setOpenGLView);
CCSize screenSize = CCEGLView::sharedOpenGLView~~>getFrameSize;
CCSize designSize = CCSizeMake;
pEGLView~~>setDesignResolutionSize;
pDirector~~>setContentScaleFactor(screenSize.height/designSize.height);

On android device with 1024x768 resolution i saw that it’s became full screen and sprites correctly located, but sprites not scaled. Does sprites should be scaled? Or i something missed?

Thanks,
Siarhei

try with all policies to meet your need…

pEGLView~~>setDesignResolutionSize;
pEGLView~~>setDesignResolutionSize(designSize.width, designSize.height, kResolutionShowAll);
pEGLView->setDesignResolutionSize(designSize.width, designSize.height, kResolutionExactFit);

The better testing would be take 2 images with 2048x1536 in ipadhd and 1024x768 in ipad (to cover whole screen of ipads…Check HelloCpp sample Resources for help)
Now apply each poicy one by one and check output in diferent android resolutions…

You will see the output…