Cocos2d-x HD Games & how to fix flash screen problems on iPad 2

Source: Internet
Author: User

Here are two examples. (The author may fix these bugs in the next version)

Fantasy 2 HD

Http://itunes.apple.com/app/link-link-2-hd/id439611994? Mt = 8,

Fishery crisis HD

Http://itunes.apple.com/app/fisheriescrisis/id440999336? Mt = 8

According to the cocos2d-iphone Post "cocos2d and iPad 2" http://www.cocos2d-iphone.org/archives/1430, cocos2d-x games have the same problem, RicardoQuesada believes this is a bug on iPad2, not caused by cocos2d.

In the default settings, the cocos2d-x uses a 3D projection with a deep buffer, In the CCDirector: setgldefavaluvalues () function

VoidCCDirector: setgldefavaluvalues (void)

{

// This method is called only after openGLView _ initialization.

Assert (m_pobOpenGLView );

SetAlphaBlending (true );

SetDepthTest (true );

SetProjection (m_eProjection );

// M_eProjection is set to kCCDirectorProjectionDefault in ccctor ctor: init ().

// KCCDirectorProjectionDefault is set to kCCDirectorProject3D in CCDirector. h.

//...

}

Therefore, do not forget to call iPad 2 games.

// Solution A: Disable deep detection.

CCDirector: sharedDirector ()-> setDepthTest (false );

Or

// Solution B: 2D projection

CCDirector: sharedDirector ()-> setProjection (kCCDirectorProjection2D );

Select any one. After the modification, please test your entire game again. SetDepthTest may affect some effects, transformations, and actions on the Z axis of the tile map.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.