Why am I getting "Retina display not supported"?

Forums Programming cocos2d support (graphics engine) Why am I getting "Retina display not supported"?

This topic contains 9 replies, has 5 voices, and was last updated by  lummis 1 year, 7 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
Author Posts
Author Posts
August 31, 2012 at 3:33 am #243904

lummis
Participant
@lummis

I don’t think I was getting this until recently and I can’t think of anything I changed that’s related to it. Also I believe my game is actually displaying in -hd mode (960 x 640). Also it complains when a resource file with the ‘-hd’ suffix is missing.

Here’s my AppDelegate code with comments removed for brevity:

- (void) applicationDidFinishLaunching:(UIApplication*)application {
ANNOUNCE
// Init the window
//autorelease for static analysis
self.window = [UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds autorelease];

if( !!! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] )
[CCDirector setDirectorType:kCCDirectorTypeDefault];

CCDirector *director = [CCDirector sharedDirector];
//autorelease for static anal.
self.viewController = [[[RootViewController alloc] initWithNibName:nil bundle:nil] autorelease];
viewController.wantsFullScreenLayout = YES;
EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGB565 // kEAGLColorFormatRGBA8
depthFormat:0 // GL_DEPTH_COMPONENT16_OES
];
[director setOpenGLView:glView];
if( !!! [director enableRetinaDisplay:YES] )
CCLOG(@"Retina Display Not supported");

Edit: I should have said I’m using cocos2d V1.0.1 with an iPhone 4, iOS 5.1.1

August 31, 2012 at 8:05 am #387014

tiggybouncer
Participant
@tiggybouncer

Try with only one !… mine only needs one to work :P

August 31, 2012 at 9:40 am #387015

ayt
Participant
@ayt

“!!!” should give the same result as “!”

August 31, 2012 at 9:44 am #387016

tiggybouncer
Participant
@tiggybouncer

@ayt Ahhhhh :) I didn’t know that… thanks :)

August 31, 2012 at 3:07 pm #387017

lummis
Participant
@lummis

Any odd number of exclams means “not”. The extraneous ones are optimized out by the compiler so they aren’t even there at run time. I like to use three to make them very noticeable. The ‘!’ character is so narrow that sometimes it gets lost to the eye when scanning over code quickly. Any way, that’s not the point of the question.

September 1, 2012 at 2:48 am #387018

blsimms
Participant
@blsimms

Hi lummis,

What happen when step into the enableRetinaDisplay method.

Should give you a clue

September 1, 2012 at 3:34 am #387019

lummis
Participant
@lummis
September 1, 2012 at 5:16 am #387020

lummis
Participant
@lummis

I just tried it so I could answer your question and now it no longer says “retina display not supported” even though I haven’t changed a single thing since I wrote the question. I’m bewildered. It’s too late for me to pursue it further tonight so I’ll have to get back to it tomorrow. Thanks very much for your response and your question.

September 7, 2012 at 5:12 am #387021

Gunawan Lim
Participant
@gunawan

Hello there, I’m still new in cocos2d, but maybe I can help you with this

If you get “Retina Display Not Supported”, it’s mean your simulator device not set into iPad or IPhone retina display

So to set you simulator into retina display, follow this step:

Open iOS Simulator –>Hardware –>Device –>then select iPad (Retina) or iPhone (Retina)

Hope this can help you..

September 8, 2012 at 5:26 am #387022

lummis
Participant
@lummis

Gunawan Lim: Thanks for your suggestion but unfortunately that isn’t the answer. I always have my iPhone simulator set to Retina display (I just checked to be sure it wasn’t changed.) Also, I normally test on the iPhone device not the simulator and this problem definitely happened on the device (iPhone 4).

It’s now several days since I wrote the question and I’ve not seen this problem again, although I didn’t make any changes related to it. So I don’t have a definite explanation. My present hypothesis is that it happened because I ran the game immediately after turning on the iPhone and various system softwares weren’t finished initializing yet. I have pretty definite evidence of another problem being caused by that. I wish I could be sure but it isn’t reproducible so I’m not sure.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.