remove kmMat4 in RenderTexture.cpp

This commit is contained in:
Huabing.Xu 2014-04-11 13:58:42 +08:00
parent 685b9ea297
commit e5802a56da
1 changed files with 4 additions and 6 deletions

View File

@ -539,9 +539,8 @@ void RenderTexture::onBegin()
// Calculate the adjustment ratios based on the old and new projections
float widthRatio = size.width / texSize.width;
float heightRatio = size.height / texSize.height;
kmMat4 orthoMatrix;
kmMat4OrthographicProjection(&orthoMatrix, (float)-1.0 / widthRatio, (float)1.0 / widthRatio,
(float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1,1 );
Matrix orthoMatrix;
Matrix::createOrthographicOffCenter((float)-1.0 / widthRatio, (float)1.0 / widthRatio, (float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1, 1, &orthoMatrix);
director->multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, orthoMatrix);
}
//calculate viewport
@ -695,9 +694,8 @@ void RenderTexture::begin()
float widthRatio = size.width / texSize.width;
float heightRatio = size.height / texSize.height;
kmMat4 orthoMatrix;
kmMat4OrthographicProjection(&orthoMatrix, (float)-1.0 / widthRatio, (float)1.0 / widthRatio,
(float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1,1 );
Matrix orthoMatrix;
Matrix::createOrthographicOffCenter((float)-1.0 / widthRatio, (float)1.0 / widthRatio, (float)-1.0 / heightRatio, (float)1.0 / heightRatio, -1, 1, &orthoMatrix);
director->multiplyMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, orthoMatrix);
}