Review transforms to match OpenGL 1.1

This commit is contained in:
raysan5
2017-08-04 18:34:51 +02:00
parent 1f310f7d4b
commit eeca607506
5 changed files with 100 additions and 100 deletions

View File

@@ -446,7 +446,8 @@ void rlTranslatef(float x, float y, float z)
{
Matrix matTranslation = MatrixTranslate(x, y, z);
*currentMatrix = MatrixMultiply(*currentMatrix, matTranslation);
// NOTE: We transpose matrix with multiplication order
*currentMatrix = MatrixMultiply(matTranslation, *currentMatrix);
}
// Multiply the current matrix by a rotation matrix
@@ -458,7 +459,8 @@ void rlRotatef(float angleDeg, float x, float y, float z)
Vector3Normalize(&axis);
matRotation = MatrixRotate(axis, angleDeg*DEG2RAD);
*currentMatrix = MatrixMultiply(*currentMatrix, matRotation);
// NOTE: We transpose matrix with multiplication order
*currentMatrix = MatrixMultiply(matRotation, *currentMatrix);
}
// Multiply the current matrix by a scaling matrix
@@ -466,7 +468,8 @@ void rlScalef(float x, float y, float z)
{
Matrix matScale = MatrixScale(x, y, z);
*currentMatrix = MatrixMultiply(*currentMatrix, matScale);
// NOTE: We transpose matrix with multiplication order
*currentMatrix = MatrixMultiply(matScale, *currentMatrix);
}
// Multiply the current matrix by another matrix