using pointer instead of Director::getInstance() in RenderTexture

This commit is contained in:
Huabing.Xu 2014-04-29 15:13:24 +08:00
parent bd93a5cb76
commit faa0f67644
1 changed files with 2 additions and 2 deletions

View File

@ -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;