Bug in matrix4's buildPerspectiveMatrix functions
3D Engine c++
Brought to you by:
cutealien,
nimphoenix2
I'm using OpenGL on mac and I noticed that the near value was not respected when using the buildPerspectiveMatrix* of matrix4.
In matrix4.h, the fix is there but commented out:
M[10] = (T)(zFar/(zNear-zFar)); // DirectX version
// M[10] = (T)(zFar+zNear/(zNear-zFar)); // OpenGL version
and
M[14] = (T)(zNear*zFar/(zNear-zFar)); // DirectX version
// M[14] = (T)(2.0f*zNear*zFar/(zNear-zFar)); // OpenGL version
I don't know exactly where the fix should go then? Into COpenGLDriver.cpp ?
Issue #1113819 is related.
Should be fixed in svn trunk since r5771 (most changes in r5769, but that version didn't yet work fully).