diff --git a/include/Nazara/Math/Matrix4.inl b/include/Nazara/Math/Matrix4.inl index 0f1f01288..e7c5ae29d 100644 --- a/include/Nazara/Math/Matrix4.inl +++ b/include/Nazara/Math/Matrix4.inl @@ -471,13 +471,13 @@ NzMatrix4& NzMatrix4::MakeIdentity() } template -NzMatrix4& NzMatrix4::MakeOrtho(T left, T top, T width, T height, T zNear, T zFar) +NzMatrix4& NzMatrix4::MakeOrtho(T left, T right, T top, T bottom, T zNear, T zFar) { - // http://msdn.microsoft.com/en-us/library/windows/desktop/bb204941(v=vs.85).aspx - Set(F(2.0)/(width-left), F(0.0), F(0.0), -(width+left)/(width-left), - F(0.0), F(2.0)/(top-height), F(0.0), -(top+height)/(top-height), - F(0.0), F(0.0), F(-2.0)/(zFar-zNear), -(zFar+zNear)/(zFar-zNear), - F(0.0), F(0.0), F(0.0), F(1.0)); + // http://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml + Set(F(2.0) / (right - left), F(0.0), F(0.0), F(0.0), + F(0.0), F(2.0) / (top - bottom), F(0.0), F(0.0), + F(0.0), F(0.0), F(1.0) / (zFar - zNear), F(0.0), + (left + right) / (left - right), (top + bottom) / (bottom - top), zNear/(zNear - zFar), F(1.0)); return *this; }