mirror of https://github.com/axmolengine/axmol.git
fixed #1297: fixed a bug in CCRenderTexture::begin. The parameters of glViewPort should not multiply CC_CONTENT_SCALE_FACTOR().
This commit is contained in:
parent
734ea54aba
commit
4b7f9f582f
|
@ -172,10 +172,10 @@ void CCRenderTexture::begin()
|
|||
float heightRatio = size.height / texSize.height;
|
||||
|
||||
// Adjust the orthographic projection and viewport
|
||||
glViewport(0, 0, (GLsizei)(texSize.width * CC_CONTENT_SCALE_FACTOR()), (GLsizei)(texSize.height * CC_CONTENT_SCALE_FACTOR()));
|
||||
glViewport(0, 0, (GLsizei)texSize.width, (GLsizei)texSize.height);
|
||||
|
||||
// special viewport for 3d projection + retina display
|
||||
if ( director->getProjection() == kCCDirectorProjection3D && CC_CONTENT_SCALE_FACTOR() != 1 )
|
||||
if ( director->getProjection() == kCCDirectorProjection3D && CC_CONTENT_SCALE_FACTOR() != 1.0f )
|
||||
{
|
||||
glViewport((GLsizei)(-texSize.width/2), (GLsizei)(-texSize.height/2), (GLsizei)(texSize.width * CC_CONTENT_SCALE_FACTOR()), (GLsizei)(texSize.height * CC_CONTENT_SCALE_FACTOR()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue