私はこの素敵なチュートリアルに従いましたhttp://www.cocos2d-x.org/projects/cocos2d-x/wiki/Multi_resolution_support
このようにして、私にとってはうまくいきました。高解像度の画像を 1 枚使用しました
AppDelegate.cpp
typedef struct tagResource
{
cocos2d::CCSize size;
char directory[100];
}Resource;
static Resource smallResource = { cocos2d::CCSizeMake(320,480), "iphone" };
static Resource mediumResource = { cocos2d::CCSizeMake(768,1024), "ipad" };
static Resource largeResource = { cocos2d::CCSizeMake(1536,2048), "ipadhd" };
static cocos2d::CCSize designResolutionSize = cocos2d::CCSizeMake(640,1024);
CCEGLView* pEGLView = CCEGLView::sharedOpenGLView();
CCSize frameSize = pDirector->getOpenGLView()->getFrameSize();
pEGLView->setDesignResolutionSize( designResolutionSize.width, designResolutionSize.height, kResolutionExactFit);
if ((frameSize.height > mediumResource.size.height))
{
pDirector->setContentScaleFactor(largeResource.size.height/designResolutionSize.height);
}
// if the frame's height is larger than the height of small resource size, select medium resource.
else if ((frameSize.height > smallResource.size.height))
{
pDirector->setContentScaleFactor(mediumResource.size.height/designResolutionSize.height);
}
// if the frame's height is smaller than the height of medium resource size, select small resource.
else
{
pDirector->setContentScaleFactor(smallResource.size.height/designResolutionSize.height);
}
CCDirector::sharedDirector()->setContentScaleFactor(1.f);