summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 3d327a6f..bc851668 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -1100,6 +1100,12 @@ 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 || bottom - top <= 0)
+ {
+ *RLGL.State.currentMatrix = MatrixIdentity();
+ return;
+ }
+
Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar);
*RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho);