Coordinates are already in terms of pixels -- no need to do content scaling

This commit is contained in:
James Gregory 2013-05-17 17:08:46 -07:00
parent a1ff189854
commit 2bcbf5c2b8
1 changed files with 2 additions and 2 deletions

View File

@ -182,12 +182,12 @@ void CCGridBase::set2DProjection()
CCSize size = director->getWinSizeInPixels();
glViewport(0, 0, (GLsizei)(size.width * CC_CONTENT_SCALE_FACTOR()), (GLsizei)(size.height * CC_CONTENT_SCALE_FACTOR()) );
glViewport(0, 0, (GLsizei)(size.width), (GLsizei)(size.height) );
kmGLMatrixMode(KM_GL_PROJECTION);
kmGLLoadIdentity();
kmMat4 orthoMatrix;
kmMat4OrthographicProjection(&orthoMatrix, 0, size.width * CC_CONTENT_SCALE_FACTOR(), 0, size.height * CC_CONTENT_SCALE_FACTOR(), -1, 1);
kmMat4OrthographicProjection(&orthoMatrix, 0, size.width, 0, size.height, -1, 1);
kmGLMultMatrix( &orthoMatrix );
kmGLMatrixMode(KM_GL_MODELVIEW);