From faa0f676443ed77fe19b3de7e0491550b767f57a Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Tue, 29 Apr 2014 15:13:24 +0800 Subject: [PATCH] using pointer instead of Director::getInstance() in RenderTexture --- cocos/2d/CCRenderTexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 2e8923f94f..855e2d4290 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -537,7 +537,7 @@ void RenderTexture::onBegin() const Size& texSize = _texture->getContentSizeInPixels(); // Calculate the adjustment ratios based on the old and new projections - Size size = Director::getInstance()->getWinSizeInPixels(); + Size size = director->getWinSizeInPixels(); float widthRatio = size.width / texSize.width; float heightRatio = size.height / texSize.height; @@ -692,7 +692,7 @@ void RenderTexture::begin() const Size& texSize = _texture->getContentSizeInPixels(); // Calculate the adjustment ratios based on the old and new projections - Size size = Director::getInstance()->getWinSizeInPixels(); + Size size = director->getWinSizeInPixels(); float widthRatio = size.width / texSize.width; float heightRatio = size.height / texSize.height;