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 6700041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:46:02+00:00 2026-05-26T06:46:02+00:00

In some cocos2d-iphone documentation , I was told to put this // IMPORTANT: Call

  • 0

In some cocos2d-iphone documentation, I was told to put this

// IMPORTANT: Call this function at the very beginning, before running your 1st scene
// Create a depth buffer of 24 bits
// These means that openGL z-order will be taken into account
[[CCDirector sharedDirector] setDepthBufferFormat:kDepthBuffer16];

To allow some 3D effects in my game with actions. However, for some reason, neither setDepthBufferFormat nor kDepthBuffer16 are recognized by XCode. Any ideas?

  • 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-26T06:46:02+00:00Added an answer on May 26, 2026 at 6:46 am

    The cocos2d documentation is partially out of date, unfortunately. The method you mentioned no longer exists. Instead, you will have to modify the line in the app delegate method applicationDidFinishLaunching that initializes the EAGLView. There’s a “viewWithFrame” variant that takes the extra parameters of depthFormat:

    // Create an EAGLView with a RGB8 color buffer, and a depth buffer of 24-bits
    EAGLView* glView = [EAGLView viewWithFrame:[window bounds]
                                   pixelFormat:kCCTexture2DPixelFormat_RGBA8888
                                   depthFormat:GL_DEPTH_COMPONENT16_OES
                            preserveBackbuffer:NO
                                    sharegroup:nil
                                 multiSampling:NO
                               numberOfSamples:0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to convert some Cocos2d-iphone code to Cocos2d-x code and could use
I am experimenting with some new ideas in Cocos2D/Box2D on iPhone. I want to
Hey, im running cocos2d, box2d and several particle systems on the iPhone 4. I've
I have worked some with Cocos2d for iPhone and find it delightful. I am
I am developing a cocos2d IPhone app using the SimpleAudioEngine to play some mp3
I am using Cocos2D for my main framework. In some cases, I want Cocos2D
Some Eclipse plugins are mandated by your environment. The appropriate source code management plugin,
I have a Cocos2D iPhone application that requires a set of CGRects overlaid on
I have a Cocos2d/openGL iPhone game. It's a universal app and I'm dealing with
I need some information about using cocos2d in iPad. Can we use 2048x2048 sprite

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.