added missing WP8 device orientation

This commit is contained in:
Dale Stammen 2014-04-19 10:06:27 -07:00
parent 768e0bd53f
commit b0adaee331
1 changed files with 12 additions and 1 deletions

View File

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