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

  • Home
  • SEARCH
  • 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 7399991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:08:05+00:00 2026-05-29T04:08:05+00:00

I have a very simple game using Xcode v4.2.1, Cocos2d v5.0.1. I’ve tried both

  • 0

I have a very simple game using Xcode v4.2.1, Cocos2d v5.0.1. I’ve tried both compilers in Xcode (LLVM GCC 4.2 and Apple LLVM compiler 3.0. Is there a preference??) On the game screen is a UIKit button that presents the user with a Interface Builder (nib) Settings/Options screen to customize the game a bit. This is all based on what I learned in Ray Wenderlich’s tutorial (http://www.raywenderlich.com/4817/how-to-integrate-cocos2d-and-uikit).

After the user makes their changes, they are returned to the game and the changes are in place.

This all works as I want in the simulator, however, when I test the game on an iPad I get the following errors in the debug window:

2012-01-27 18:25:27.305 BonkBonk[1082:707] failed to call context
2012-01-27 18:25:27.310 BonkBonk[1082:707] cocos2d: surface size: 1024x768
2012-01-27 18:25:27.316 BonkBonk[1082:707] Failed to make complete framebuffer object 8cdd
OpenGL error 0x0506 in -[EAGLView swapBuffers]
OpenGL error 0x0506 in -[EAGLView swapBuffers]
OpenGL error 0x0506 in -[EAGLView swapBuffers]

The OpeenGl errors continue on indefinitely.

I use the function viewWillAppear to capture the return from the settings/options screen so that I can pass the new settings to the game layer. If I comment out this code the problem goes away, however, I am not able to get the new user settings to the game layer.

Here is the code:

- (void) viewWillAppear:(BOOL)animated
{
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    //CCScene *scene = [[CCDirector sharedDirector] runningScene];
    CCScene *scene = [BonkBonkLayer scene];
    id layer = [scene getChildByTag:1];
    [layer userSettings];
    [super viewWillAppear:animated];
}

The commented out line //CCSene *scene… was another failed attempt at getting the layer object from the scene so that I could call the userSettings method where the game layer then can assimilate it into the game.

  • 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-05-29T04:08:06+00:00Added an answer on May 29, 2026 at 4:08 am

    OK, so I’ve found something that alleviates my issue.

    If anyone knows anything about this, please let me know. I will continue to use this fix unless I hear a reason from someone more knowledgable than myself (and that’s not that difficult).

    The solution is found in the comment by “psionic” at the end of the following discussion:
    http://www.cocos2d-iphone.org/forum/topic/7068.

    Basically, I created a static bool in the EAGLView class (EAGLView.m) that surrounds the call to _resizeFromLayer in the layoutSubViews member function. The call to _resizeFromLayer is only called the first time through, and then never again.

    Please read the above discussion and let me know what you like/dislike about this solution, other than the obvious… it’s a hack.

    A hack,that works. I think.

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

Sidebar

Related Questions

I have a very simple WPF application in which I am using data binding
This is a very simple game I'm trying to write but I have a
I'm making a very simple turn based battle game using ActionScript 2.0. I'm VERY
i have a very simple turn-based online game in java. the client talks to
I am a rather new C++ programmer. I have made a very simple game
I have made a very simple game in titanium mobile. I only use 90k
I'm working on a simple JavaScript game using HTML5 canvas. It's a very typical
i have very simple problem. I need to create model, that represent element of
I have very simple select like this: SELECT * FROM table WHERE column1 IN
I have very simple window where I have 2 buttons - one for cancel,

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.