From d3149a7ec2e0934d1cbff779d31199573607074e Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Tue, 8 Nov 2016 15:58:41 +0800 Subject: [PATCH] fix viewport size change after capture screen --- native/cocos/2d/CCRenderTexture.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/native/cocos/2d/CCRenderTexture.cpp b/native/cocos/2d/CCRenderTexture.cpp index 6f7d547ece..df3b5c072c 100644 --- a/native/cocos/2d/CCRenderTexture.cpp +++ b/native/cocos/2d/CCRenderTexture.cpp @@ -654,8 +654,7 @@ void RenderTexture::onEnd() // restore viewport director->setViewport(); - Size size = director->getWinSizeInPixels(); - glViewport(0, 0, (GLsizei)(size.width), (GLsizei)(size.height) ); + // director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION, _oldProjMatrix); director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _oldTransMatrix);