@@ -127,6 +127,7 @@ class PageTransitionForward : public CCTransitionPageTurn
127
127
public:
128
128
static CCTransitionScene* transitionWithDuration (ccTime t, CCScene* s)
129
129
{
130
+ CCDirector::sharedDirector ()->setDepthTest (true );
130
131
return CCTransitionPageTurn::transitionWithDuration (t, s, false );
131
132
}
132
133
};
@@ -136,6 +137,7 @@ class PageTransitionBackward : public CCTransitionPageTurn
136
137
public:
137
138
static CCTransitionScene* transitionWithDuration (ccTime t, CCScene* s)
138
139
{
140
+ CCDirector::sharedDirector ()->setDepthTest (true );
139
141
return CCTransitionPageTurn::transitionWithDuration (t, s, true );
140
142
}
141
143
};
@@ -186,6 +188,9 @@ static int s_nSceneIdx = 0;
186
188
187
189
CCTransitionScene* createTransition (int nIndex, ccTime t, CCScene* s)
188
190
{
191
+ // fix bug #486, without setDepthTest(false), FlipX,Y will flickers
192
+ CCDirector::sharedDirector ()->setDepthTest (false );
193
+
189
194
switch (nIndex)
190
195
{
191
196
case 0 : return CCTransitionJumpZoom::transitionWithDuration (t, s);
@@ -273,9 +278,6 @@ void TransitionsTestScene::runThisTest()
273
278
CCLayer * pLayer = new TestLayer1 ();
274
279
addChild (pLayer);
275
280
pLayer->release ();
276
-
277
- // fix bug #486, without setDepthTest(false), FlipX,Y will flickers
278
- CCDirector::sharedDirector ()->setDepthTest (false );
279
281
280
282
CCDirector::sharedDirector ()->replaceScene (this );
281
283
}
0 commit comments