Skip to content

resolve the effect of PageTransitionForward&PageTransitionBackward #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/tests/TransitionsTest/TransitionsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class PageTransitionForward : public CCTransitionPageTurn
public:
static CCTransitionScene* transitionWithDuration(ccTime t, CCScene* s)
{
CCDirector::sharedDirector()->setDepthTest(true);
return CCTransitionPageTurn::transitionWithDuration(t, s, false);
}
};
Expand All @@ -136,6 +137,7 @@ class PageTransitionBackward : public CCTransitionPageTurn
public:
static CCTransitionScene* transitionWithDuration(ccTime t, CCScene* s)
{
CCDirector::sharedDirector()->setDepthTest(true);
return CCTransitionPageTurn::transitionWithDuration(t, s, true);
}
};
Expand Down Expand Up @@ -186,6 +188,9 @@ static int s_nSceneIdx = 0;

CCTransitionScene* createTransition(int nIndex, ccTime t, CCScene* s)
{
// fix bug #486, without setDepthTest(false), FlipX,Y will flickers
CCDirector::sharedDirector()->setDepthTest(false);

switch(nIndex)
{
case 0: return CCTransitionJumpZoom::transitionWithDuration(t, s);
Expand Down Expand Up @@ -273,9 +278,6 @@ void TransitionsTestScene::runThisTest()
CCLayer * pLayer = new TestLayer1();
addChild(pLayer);
pLayer->release();

// fix bug #486, without setDepthTest(false), FlipX,Y will flickers
CCDirector::sharedDirector()->setDepthTest(false);

CCDirector::sharedDirector()->replaceScene(this);
}
Expand Down