About cocos2dx_v1.x version iphone with Android run out

Source: Internet
Author: User



The particle system of the cause engine, when the particle system is used, the console gives a warning:

OpenGL error 0x0500 in-[eaglview Swapbuffers]

Because of this problem will cause in the package good picture white block, the actual model: Android platform M9,ios:iphone 4.3.3

2. I run the COCOS2DX 1.x version in IOS6 to invoke the Gamecenter related function, the following error occurred:

(Note: This issue is not only used in GAMECENTER,IOS6, but is also encountered)


1 terminating app due to uncaught exception' uiapplicationinvalidinterfaceorientation ', Reason:' supported orientations have no common orientation with The application, and Shouldautorotate is returning YES '

The solution is as follows: For more resources, see

Add the following three functions to the call to view controller (the error view controller Class) using Gamecenter:

-(BOOL) Shouldautorotatetointerfaceorientation: (uiinterfaceorientation) interfaceorientation
{

return (interfaceorientation = = Uiinterfaceorientationlandscapeleft | | interfaceorientation = = Uiinterfaceorientationlandscaperight);

}

-(Nsuinteger) supportedinterfaceorientations{
return uiinterfaceorientationmasklandscape;
}

-(BOOL) shouldautorotate
{
return YES;
}

COCOS2DX is typically used for iOS platform-level components and is written in appcontroller.h/mm under the iOS folder under the COCOS2DX project. Of course you can also define your own mm mixed class.

3. The third issue is about the COCOS2DX 1.x version of Android, a cause of the flash-back.

There are a lot of different types of problems (but if you write code that doesn't have any problems), here's a question for me to verify.

In my COCOS2DX project, Xcode wrote code with the following two classes, with the following inheritance:

Hclassa:public Ccsprte

Hclassb:public Hclassa

If you force the Hclassa type to be forced to the HCLASSB object will cause an Android flash-back problem!!!!

Although this kind of parent strong rotor class can work in Java, there is no problem running on iOS, but! When compiling to Android, there will be a 100% flash-back phenomenon.

About the NDK compiled to Android after the debug printing cclog and cclog problem here simply say:

Before many children's shoes asked me, why use Cclog in Android do not print, cough cough, children's shoes can click into the definition of cclog, it is officially compiled after the automatic cancellation does not break into the code, and Cclog is not, so we want to print on Android to observe, then please use Cclog.

About cocos2dx_v1.x version iphone with Android run out

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.