Glitches in texture on iPhone5 (iOS6.1)

Glitches in texture on iPhone5 (iOS6.1)

There are some glitches in texture in my game screen (please, follow the link: http://ge.tt/3KjAIxY?c ).

It happens on iPhone5 (iOS6.1).

iPad (5.1.1), iPhone4 (6.0), and Android devices work well.

cocos2d-x version is 2.1.1.

Do you have any idea?

Thank you in advance.

Get the latest version from github :slight_smile:

Sorry for my question, but could you hint, what the exact commit does fix this issue?

I afraid if I get all the changes it will make my game unstable.

I only assume that updating your lib will fix your issue, at least it helped me when I was getting texture blinks on HTC Wildifire.

I see.
Thank you, I’ll try it.

Is iphone5 supported ? mine is returning a 640x960 resolution like an iphone 4., with blank lines up and down in portrait.

Does it work in xcode simulator? Have you included Default-568h@2x.png in your project?

Leszek Leszek wrote:

Does it work in xcode simulator? Have you included Default-568h@2x.png in your project?

it works well in the simulator.
We have not included Default-568h@2x.png to the project. Can it affect the issue %) ?

Afaik yes, you must include this file. Check http://stackoverflow.com/questions/12404699/how-iphone-5-ios6-will-decide-if-an-app-must-be-run-in-letterbox-mode

Leszek Leszek wrote:

Afaik yes, you must include this file. Check http://stackoverflow.com/questions/12404699/how-iphone-5-ios6-will-decide-if-an-app-must-be-run-in-letterbox-mode

I’ve double checked. And actually we already have it in the project.
But the glitches are still here.

I hope Victor’s idea will work for me. But it’s too risky for me to upgrade to unstable cocos2d-x code.

Victor Komarov wrote:

Get the latest version from github :slight_smile:

Unfortunately, it does not work for me.

Maybe other ideas?

Do you use batchnode? Do you anyhow modify the draw() method?

Fedor Shubin wrote:

There are some glitches in texture in my game screen (please, follow the link: http://ge.tt/3KjAIxY?c ).

I had glitches similar to this (not as bad) on iPad and adding this to applicationDidFinishLaunching() fixed it for me:
pDirector->setProjection(kCCDirectorProjection2D);

Tim Park wrote:

Fedor Shubin wrote:
> There are some glitches in texture in my game screen (please, follow the link: http://ge.tt/3KjAIxY?c ).
>
I had glitches similar to this (not as bad) on iPad and adding this to applicationDidFinishLaunching() fixed it for me:
pDirector->setProjection(kCCDirectorProjection2D);

Tim, thank you very much! It really works. But actually, I do not know why? :slight_smile:
It’s seems to be a bug in cocos2d-x, isn’t it?

I think kCCDirectorProjection2D should be default in next cocos2d-x versions. This solves many problems and I don’t get why cocos2d-x as a 2d engine uses 3d projection by default.