[BUG] Animation Flickers in iPhone 4s.


#1

The screen will flicker when I scale and rotate a CCSprite.

I’m using cocos2d-1.0.1-x-0.13.0 beta.

I uploaded the code and project at GitHub: https://github.com/diwu/Screen-Flicker-Bug-Cocos2d-X

Also there’s a video at YouTube demonstrating the bug: http://youtu.be/EQCiwenAIvs

Note: this bug only appears in iPhone 4s. The code works well on iPhone 4 and Nexus S.


LayerColor flickering while MoveTo action is active
#2

Same problem here :frowning: on Iphone 4S
Maybe because I didn’t made the retina images yet?


#3

I don’t think it has anything to do with the retina thing. I think it’s an underlying bug somewhat related to the 4s GPU specifications and the Cocos2d-X implementation.


#4

Is there any plan to fix this in Cocos2d-x ?

Thanks for all the nice work!


#5

try this on or AppDelegate.cpp @ bool AppDelegate::applicationDidFinishLaunching method.

#if ( CC_TARGET_PLATFORM == CC_PLATFORM_IOS )
pDirector~~>setDepthTest;
//pDirector~~>setProjection( kCCDirectorProjection2D );
#endif


#6

It’s a 1-year-old problem. Ricardo Quesada reported it to PowerVR http://www.imgtec.com/forum/forum_posts.asp?TID=1256&PID=4255. It’s also discussed in apple forum http://devforums.apple.com/message/414331
Here’s the description and resolution http://www.cocos2d-x.org/news/24


#7

I solved this problem only by disabling depth test.

bool AppDelegate::applicationDidFinishLaunching()
{

// Just add this line
glDisable(GL_DEPTH_TEST);

}