diff options
| author | Ray <[email protected]> | 2021-01-09 12:37:21 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-01-09 12:37:21 +0100 |
| commit | bbc09288bd1732611ebd930eaf28d43f1310b784 (patch) | |
| tree | f5534f88474de33a72e8eac16705be406e159995 /src/rlgl.h | |
| parent | b76dc06297289245b477a2d98e44271149524cdd (diff) | |
| download | raylib-bbc09288bd1732611ebd930eaf28d43f1310b784.tar.gz raylib-bbc09288bd1732611ebd930eaf28d43f1310b784.zip | |
rlOrtho() reverted change
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1100,12 +1100,11 @@ void rlFrustum(double left, double right, double bottom, double top, double znea // Multiply the current matrix by an orthographic matrix generated by parameters void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar) { - if (((right - left) > 0) && ((top - bottom) > 0)) - { - Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar); - *RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho); - } - else *RLGL.State.currentMatrix = MatrixIdentity(); + // NOTE: If left-right and top-botton values are equal it could create + // a division by zero on MatrixOrtho(), response to it is platform/compiler dependant + Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar); + + *RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho); } #endif |
