mirror of https://github.com/axmolengine/axmol.git
The orientation of render texture should be rotated when _keepMatrix is true
This commit is contained in:
parent
a2413a6538
commit
7e7c3aeb1c
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue