mirror of https://github.com/axmolengine/axmol.git
added missing WP8 device orientation
This commit is contained in:
parent
768e0bd53f
commit
b0adaee331
|
@ -525,6 +525,8 @@ void RenderTexture::onBegin()
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue