how to avoid the blink while move a big size texture(like 640*960)in cocos2d-x


#1

when i use CCMoveTo action with a big size texture, the moving texture is always blinking.
how to avoid this problem?


#2

Only big size texture causes this problem?
What codes did you write?
What is the engine version?
What device did you test on?


#3

engine: cocos2d-1.0.1-x-0.12.0 @ Mar 05, 2012
device:the new ipad
code write in lua: add a big texture to a layer, and move the layer from position a to b and reverse and repeat is forever, then the texture is blinking during the moving action
currently, it only happen with big textures


#4

not correct in ipad2 too


#5

I’m not entirely sure what is wrong, but it sounds like a flickering issue that happens to the newer devices: iPad2 and iPhone 4GS.

Try using the following function: CCDirector::sharedDirector()->setDepthTest(false);

I’ve had this flickering issue for a project that I was working on. On the newer devices when the view scrolled, the UI elements would start flickering and on occcassion the background image as well.


#6

Emmanuel B. wrote:

I’m not entirely sure what is wrong, but it sounds like a flickering issue that happens to the newer devices: iPad2 and iPhone 4GS.
>
Try using the following function: CCDirector::sharedDirector->setDepthTest;
>
I’ve had this flickering issue for a project that I was working on. On the newer devices when the view scrolled, the UI elements would start flickering and on occcassion the background image as well.

Man ! Works for me

Thanks !


#7

Yes ! A lot of thanks ! Since the start of the afternoon I have searched for this solution :slight_smile:


#8

Have same issue with iPhone5.
Setting projection to kCCDirectorProjection2D solved problem.

pDirector->setProjection(kCCDirectorProjection2D);

Perhaps it would be useful for anybody.


#9

Thanks for the tip. I’m also curious why 2D projection is not the default mode in 2d engine which cocos2d-x is?