Disable retina support for Cocos2d-x

Disable retina support for Cocos2d-x
0.0 0


I want to know how I can disable retina support in Cocos2d-x 2.0.1, because I try to use the following code and not works

CCDirector *pDirector = CCDirector::sharedDirector();


This code is inside AppDelegate.h inside the method applicationDidFinishLaunching

I say it not works because the background image that has resolution 480x320 still fill the entire screen of my Ipod touch 4g(that has a retina display, 960x640)

how to disable retina image scaling in cocos2d-x framework
how to disable retina image scaling in cocos2d-x framework

rmit is working. If you disable the retina cocos2dx will load non hd graphics. Its the normal behavior.


It is normal

Your design resolution is 480x320
The enable retina only takes a high res image, if you don’t enable it then it scales the image x2


I think I understand now:

the ‘CCDirector::sharedDirector()->getWinSizeInPixels();’ will return 480x320 independent if the ‘enableRetinaDisplay’ is true or false.

the ‘CCDirector::sharedDirector()->getWinSizeInPixelsInPixels();’ will return 960x640 if the enableRetinaDisplay is true
the ‘CCDirector::sharedDirector()->getWinSizeInPixelsInPixels();’ will return 480x320 if the enableRetinaDisplay is false

This is valid for an Ipod Touch 4g(that has a retina display).

I will use the ‘CCDirector::sharedDirector()->getWinSizeInPixelsInPixels();’ within enableRetinaDisplay(true) and manual scale the images and coordinates in my next game to see if I can make a god project


the size is the same in iphone and iphonehd. the same happens with ipad and ipadhd


If you don’t enable retina on iOS the display is not working at higher resolution. So you have to enable retina on iOS