Sometimes top > bottom and sometimes bottom > top depending on drawing mode. Change ortho div by zero check for a simple equality. We don't care what the numbers are just so long as they are not the same in any axis.
This commit is contained in:
parent
b76dc06297
commit
0a0f1fa6ea
|
|
@ -1100,7 +1100,7 @@ void rlFrustum(double left, double right, double bottom, double top, double znea
|
||||||
// Multiply the current matrix by an orthographic matrix generated by parameters
|
// 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)
|
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar)
|
||||||
{
|
{
|
||||||
if (((right - left) > 0) && ((top - bottom) > 0))
|
if (right != left && top != bottom) // prevent divide by 0
|
||||||
{
|
{
|
||||||
Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar);
|
Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar);
|
||||||
*RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho);
|
*RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user