Skip to content

Commit

Permalink
Fixing transitions for fixed screen mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
slembcke committed Oct 22, 2014
1 parent 540e3db commit 0d222f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cocos2d/CCTransition.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,14 @@ - (void)startTransition:(CCScene *)scene
_outgoingTexture = [CCRenderTexture renderTextureWithWidth:size.width height:size.height pixelFormat:_transitionPixelFormat depthStencilFormat:_transitionDepthStencilFormat];
_outgoingTexture.position = CGPointMake(size.width * 0.5f + rect.origin.x, size.height * 0.5f + rect.origin.y);
_outgoingTexture.contentScale /= _outgoingDownScale;
_outgoingTexture.projection = [CCDirector sharedDirector].projectionMatrix;
[self addChild:_outgoingTexture z:_outgoingOverIncoming];

// create texture for incoming scene
_incomingTexture = [CCRenderTexture renderTextureWithWidth:size.width height:size.height pixelFormat:_transitionPixelFormat depthStencilFormat:_transitionDepthStencilFormat];
_incomingTexture.position = CGPointMake(size.width * 0.5f + rect.origin.x, size.height * 0.5f + rect.origin.y);
_incomingTexture.contentScale /= _incomingDownScale;
_incomingTexture.projection = [CCDirector sharedDirector].projectionMatrix;
[self addChild:_incomingTexture];

// make sure scene is rendered at least once at progress 0.0
Expand Down

0 comments on commit 0d222f9

Please sign in to comment.