diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index 13bd2a841e..6afa220448 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -36,6 +36,7 @@ THE SOFTWARE. #include "CCLayer.h" #include "CCRenderTexture.h" #include "CCNodeGrid.h" +#include "CCNewRenderTexture.h" NS_CC_BEGIN @@ -1257,7 +1258,7 @@ TransitionCrossFade* TransitionCrossFade::create(float t, Scene* scene) return nullptr; } -void TransitionCrossFade:: draw() +void TransitionCrossFade::draw() { // override draw since both scenes (textures) are rendered in 1 scene } @@ -1273,7 +1274,7 @@ void TransitionCrossFade::onEnter() LayerColor* layer = LayerColor::create(color); // create the first render texture for inScene - RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height); + RenderTexture* inTexture = NewRenderTexture::create((int)size.width, (int)size.height); if (nullptr == inTexture) { @@ -1290,7 +1291,7 @@ void TransitionCrossFade::onEnter() inTexture->end(); // create the second render texture for outScene - RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height); + RenderTexture* outTexture = NewRenderTexture::create((int)size.width, (int)size.height); outTexture->getSprite()->setAnchorPoint( Point(0.5f,0.5f) ); outTexture->setPosition( Point(size.width/2, size.height/2) ); outTexture->setAnchorPoint( Point(0.5f,0.5f) );