태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

'iPhone/ iPodtouch/Game-Cocos2d'에 해당되는 글 1건

http://www.cocos2d-x.org/news/24

Some cocos2d-x games published their HD version for ipad. But I find some of them have a same bug: flickers on ipad2.

There are 2 examples. ( the authors may fix this bug in the next version )

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

Fisheries Crisis HD

 http://itunes.apple.com/app/fisheriescrisis/id440999336?mt=8

Regarding to cocos2d-iphone's post "cocos2d and iPad 2" http://www.cocos2d-iphone.org/archives/1430, cocos2d-x games have the same problem. RicardoQuesada believed it's a iPad2 bug, no cocos2d.

As the default setting, cocos2d-x uses 3D projection with a depth buffer, in CCDirector::setGLDefaultValues()

voidCCDirector::setGLDefaultValues(void)
{

     // This method SHOULD be called only after openGLView_ was initialized
     assert(m_pobOpenGLView);

     setAlphaBlending(true);
     setDepthTest(true);
     setProjection(m_eProjection);  
     // m_eProjection is set to kCCDirectorProjectionDefault in CCDirector::init(), while
     // kCCDirectorProjectionDefault is set to kCCDirectorProjection3D in CCDirector.h

     // ...

}

So for ipad2 games, don't forget to invoke

// alternative A: Disable Depth Test
CCDirector::sharedDirector()->setDepthTest(false);

OR

// alternative B: use 2D projection
CCDirector::sharedDirector()->setProjection(kCCDirectorProjection2D);

Either one is OK. After this modification, please re-test your whole game. setDepthTest may affect some effects, transitions, and tilemap z order behaviours


신고
블로그 이미지

*별빛*

UI/UX관련 개발이슈 및 방법을 나누는 곳입니다. Flex/AIR, Silverlight등 pc 기반 iPhone, Android등 smartphone 기반

티스토리 툴바