Merge pull request #2578 from ricardoquesada/grid_projection_fix

Grid setProjection2D fix
This commit is contained in:
James Chen 2013-05-19 22:42:51 -07:00
commit 3b77ffe478
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);