Fixed Matrix4::(Make)Ortho

Former-commit-id: fb65916496b8c28c21dcaf6c623ab1427a6e7767
This commit is contained in:
Lynix 2013-08-16 00:23:03 +02:00
parent cbc92364f4
commit 35bd693216
1 changed files with 2 additions and 2 deletions

View File

@ -600,10 +600,10 @@ NzMatrix4<T>& NzMatrix4<T>::MakeIdentity()
template<typename T>
NzMatrix4<T>& NzMatrix4<T>::MakeOrtho(T left, T right, T top, T bottom, T zNear, T zFar)
{
// http://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml
// http://msdn.microsoft.com/en-us/library/windows/desktop/bb204942(v=vs.85).aspx
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),
F(0.0), F(0.0), F(1.0) / (zNear - zFar), F(0.0),
(left + right) / (left - right), (top + bottom) / (bottom - top), zNear/(zNear - zFar), F(1.0));
return *this;