Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8136943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:55:28+00:00 2026-06-06T10:55:28+00:00

I have another weird problem which I have not been able to solve in

  • 0

I have another weird problem which I have not been able to solve in reasonable time. My app works well on iPhone 4S and iPod 4-th with and without retina enabled. It also works well on iPad3 without retina. But when iPad has retina enabled, CCSprites just do not appear. I do have camera image underlay which is shown but not graphics on top of it. I think I have all “-hd” versions of files available and they are also shown well on iPhone in retina mode.

I paste code which I think is related:

- (void) applicationDidFinishLaunching:(UIApplication*)applicationv{
    CCLOG(@"applicationDidFinishLaunching");

    window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

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

    CCDirector *director = [CCDirector sharedDirector];

    viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
    viewController.wantsFullScreenLayout = YES;

    EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
                                   pixelFormat:kEAGLColorFormatRGBA8
                                   depthFormat:0    // GL_DEPTH_COMPONENT16_OES
                        ];

    // attach the openglView to the director
    [director setOpenGLView:glView];

    // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
    if( ! [director enableRetinaDisplay:YES] )
        CCLOG(@"Retina Display Not supported");

#if GAME_AUTOROTATION == kGameAutorotationUIViewController
    [director setDeviceOrientation:kCCDeviceOrientationPortrait];
#else
    [director setDeviceOrientation:kCCDeviceOrientationLandscapeRight];
#endif

    [director setAnimationInterval:1.0/20];
    [director setDisplayFPS:NO];

    [viewController setView:glView];
    [window addSubview: viewController.view];

    [CCDirector sharedDirector].openGLView.backgroundColor = [UIColor clearColor];
    [CCDirector sharedDirector].openGLView.opaque = NO;

    glClearColor(0.0, 0.0, 0.0, 0.0);

    _cameraView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    _cameraView.opaque = NO;
    _cameraView.backgroundColor=[UIColor clearColor];
    [window addSubview:_cameraView];

    _imageView = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
    [_cameraView addSubview:_imageView];

    [window bringSubviewToFront:viewController.view];    
    [window makeKeyAndVisible];

    [CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];

    CCScene *scene = [CCScene node];
    _layer =[[[HelloWorldLayer alloc] init] autorelease]; 
    _menu =[MenuScene node]; 
    [scene addChild:_layer];
    [_layer addChild:_menu];
    viewController.fdLayer = _layer;
    _layer.root = viewController;
    [[CCDirector sharedDirector] runWithScene: scene];

And MenuScene.m:

@implementation MenuScene
+(id) scene {
    CCScene* scene = [CCScene node];
    CCLayer* layer = [MenuScene node];
    [scene addChild:layer];
    return scene;
}

-(id) init {
    if ((self = [super init])) {
        CCLOG(@"init %@", self);

        CGSize screen = [[CCDirector sharedDirector] winSize];
        CCLOG(@"%f %f",screen.width,screen.height);
        CCLayerColor *b = [CCLayerColor layerWithColor:ccc4(0, 0, 0, 100) width:screen.width height:screen.height/4];
        b.isRelativeAnchorPoint=YES;
        b.anchorPoint=ccp(0, 1); // left top corner
        b.position=ccp(0, screen.height);
        [self addChild:b];

        CCSprite* bg = [CCSprite spriteWithFile:@"01-main-logo.png"];
        bg.position = CGPointMake(screen.width / 2, screen.height*0.12);
        [b addChild:bg];

EDIT: I made temporary hack:

if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad)  {
    // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
    if( ! [director enableRetinaDisplay:YES] )
        CCLOG(@"Retina Display Not supported");
    }

but question remains – why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T10:55:32+00:00Added an answer on June 6, 2026 at 10:55 am

    Problem solved. “Make Clean” was not enough. Keeping “Option” button down when pressing “Clean” forces even more to be cleaned up. After that things started to work. There is also possibility that it was related to “Compress PNG files” setting which I changed to “No” after problems started but it was maybe not enforced. Anyway problem gone away and thanks for watching 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

another weird problem with the iPhone SDK here. I have a UITableView which contains
I have another Richfaces question which may seem rather weird. I am developing a
I am facing a weird problem. I have got a file called in which
I have this really weird problem with my MySQL table. After some time a
I have this weird problem which I don't remember to ever had in XCode
I have another web app, that uses the liferay user database. But before a
i have another question on getting my XML serialization neat, which i can't seem
Using the following steps: (I have checked this similar post , which does not
I was turned on to nstrees from another question, and have been working through
It's weird because I have done it before but it just is not working.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.