diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index b82eb8ddd8..5c73f8a91b 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -524,7 +524,9 @@ void RenderTexture::onBegin() kmGLGetMatrix(KM_GL_PROJECTION, &_oldProjMatrix); kmGLMatrixMode(KM_GL_PROJECTION); kmGLLoadMatrix(&_projectionMatrix); - + + + kmGLGetMatrix(KM_GL_MODELVIEW, &_oldTransMatrix); kmGLMatrixMode(KM_GL_MODELVIEW); kmGLLoadMatrix(&_transformMatrix); @@ -533,6 +535,15 @@ void RenderTexture::onBegin() { director->setProjection(director->getProjection()); +#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8 + kmMat4 modifiedProjection; + kmGLGetMatrix(KM_GL_PROJECTION, &modifiedProjection); + kmMat4Multiply(&modifiedProjection, CCEGLView::sharedOpenGLView()->getReverseOrientationMatrix(), &modifiedProjection); + kmGLMatrixMode(KM_GL_PROJECTION); + kmGLLoadMatrix(&modifiedProjection); + kmGLMatrixMode(KM_GL_MODELVIEW); +#endif + const Size& texSize = _texture->getContentSizeInPixels(); // Calculate the adjustment ratios based on the old and new projections