mirror of https://github.com/axmolengine/axmol.git
using pointer instead of Director::getInstance() in RenderTexture
This commit is contained in:
parent
bd93a5cb76
commit
faa0f67644
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue