The orientation of render texture should be rotated when _keepMatrix is true

This commit is contained in:
visiblelight 2014-07-17 19:53:35 +08:00
parent a2413a6538
commit 7e7c3aeb1c
1 changed files with 8 additions and 0 deletions

View File

@ -570,6 +570,14 @@ void RenderTexture::onBegin()
Mat4::createOrthographicOffCenter((float)-1.0 / widthRatio, (float)1.0 / widthRatio, (float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1, 1, &orthoMatrix);
director->multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, orthoMatrix);
}
else
{
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
Mat4 modifiedProjection = director->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
modifiedProjection = CCEGLView::sharedOpenGLView()->getReverseOrientationMatrix() * modifiedProjection;
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, modifiedProjection);
#endif
}
//calculate viewport
{