diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index ad0ff54ecf..d15cf4bf0b 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -306,7 +306,7 @@ void RenderTexture::setKeepMatrix(bool keepMatrix) _keepMatrix = keepMatrix; } -void RenderTexture::setVirtualViewPort(const Point& rtBegin, const Rect& fullRect, const Rect& fullViewport) +void RenderTexture::setVirtualViewport(const Point& rtBegin, const Rect& fullRect, const Rect& fullViewport) { _rtTextureRect.origin.x = rtBegin.x; _rtTextureRect.origin.y = rtBegin.y; diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 7aae44cd08..80f0b087ca 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -158,7 +158,7 @@ public: virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void setKeepMatrix(bool keepMatrix); - void setVirtualViewPort(const Point& rtBegin, const Rect& fullRect, const Rect& fullViewport); + void setVirtualViewport(const Point& rtBegin, const Rect& fullRect, const Rect& fullViewport); public: // XXX should be procted. diff --git a/tests/Classes/RenderTextureTest/RenderTextureTest.cpp b/tests/Classes/RenderTextureTest/RenderTextureTest.cpp index cdda5a8824..7d0aa48a50 100644 --- a/tests/Classes/RenderTextureTest/RenderTextureTest.cpp +++ b/tests/Classes/RenderTextureTest/RenderTextureTest.cpp @@ -456,7 +456,7 @@ RenderTexturePartTest::RenderTexturePartTest() _rend->retain(); _rend->setKeepMatrix(true); Size pixelSize = Director::getInstance()->getWinSizeInPixels(); - _rend->setVirtualViewPort(Point(size.width/2-150, size.height/2-150),Rect(0,0,size.width,size.height),Rect(0,0,pixelSize.width,pixelSize.height)); + _rend->setVirtualViewport(Point(size.width/2-150, size.height/2-150),Rect(0,0,size.width,size.height),Rect(0,0,pixelSize.width,pixelSize.height)); _rend->beginWithClear(1, 0, 0, 1); sprite1->visit();