mirror of https://github.com/axmolengine/axmol.git
Coordinates are already in terms of pixels -- no need to do content scaling
This commit is contained in:
parent
a1ff189854
commit
2bcbf5c2b8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue