mirror of https://github.com/axmolengine/axmol.git
issue #1056: Fixed a bug in CCDirector::setProjection.
We should invoking kmGLMultMatrix(&orthoMatrix) after invoking kmMat4OrthographicProjection.
This commit is contained in:
parent
394bb24cf5
commit
c73c84f79b
|
@ -339,6 +339,7 @@ void CCDirector::setProjection(ccDirectorProjection kProjection)
|
||||||
kmGLLoadIdentity();
|
kmGLLoadIdentity();
|
||||||
kmMat4 orthoMatrix;
|
kmMat4 orthoMatrix;
|
||||||
kmMat4OrthographicProjection(&orthoMatrix, 0, size.width, 0, size.height, -1024, 1024 );
|
kmMat4OrthographicProjection(&orthoMatrix, 0, size.width, 0, size.height, -1024, 1024 );
|
||||||
|
kmGLMultMatrix(&orthoMatrix);
|
||||||
kmGLMatrixMode(KM_GL_MODELVIEW);
|
kmGLMatrixMode(KM_GL_MODELVIEW);
|
||||||
kmGLLoadIdentity();
|
kmGLLoadIdentity();
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,9 +87,9 @@ int gaussj(kmMat4 *a, kmMat4 *b)
|
||||||
{
|
{
|
||||||
int i, icol = 0, irow = 0, j, k, l, ll, n = 4, m = 4;
|
int i, icol = 0, irow = 0, j, k, l, ll, n = 4, m = 4;
|
||||||
float big, dum, pivinv;
|
float big, dum, pivinv;
|
||||||
int indxc[4];
|
int indxc[4] = {0};
|
||||||
int indxr[4];
|
int indxr[4] = {0};
|
||||||
int ipiv[4];
|
int ipiv[4] = {0};
|
||||||
|
|
||||||
for (j = 0; j < n; j++) {
|
for (j = 0; j < n; j++) {
|
||||||
ipiv[j] = 0;
|
ipiv[j] = 0;
|
||||||
|
|
|
@ -180,7 +180,7 @@ void CCTMXLayer::setupTiles()
|
||||||
// XXX: gid == 0 --> empty tile
|
// XXX: gid == 0 --> empty tile
|
||||||
if( gid != 0 )
|
if( gid != 0 )
|
||||||
{
|
{
|
||||||
this->appendTileForGID(gid, ccp((float)x, (float)y));
|
this->appendTileForGID(gid, ccp(x, y));
|
||||||
|
|
||||||
// Optimization: update min and max GID rendered by the layer
|
// Optimization: update min and max GID rendered by the layer
|
||||||
m_uMinGID = MIN(gid, m_uMinGID);
|
m_uMinGID = MIN(gid, m_uMinGID);
|
||||||
|
|
Loading…
Reference in New Issue