From 2f1645ec8ef0e4ebb36d6b0cdaa6615bbcb43274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 28 Oct 2014 21:18:58 -0700 Subject: [PATCH] Added offset to mtxOrtho. --- include/bx/fpumath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bx/fpumath.h b/include/bx/fpumath.h index 65da05d..d877d73 100644 --- a/include/bx/fpumath.h +++ b/include/bx/fpumath.h @@ -268,7 +268,7 @@ namespace bx mtxProjXYWH(_result, 0.0f, 0.0f, width, height, _near, _far, _oglNdc); } - inline void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far) + inline void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset = 0.0f) { const float aa = 2.0f/(_right - _left); const float bb = 2.0f/(_top - _bottom); @@ -281,7 +281,7 @@ namespace bx _result[0] = aa; _result[5] = bb; _result[10] = cc; - _result[12] = dd; + _result[12] = dd + _offset; _result[13] = ee; _result[14] = ff; _result[15] = 1.0f;