Menu

#370 Bug in matrix4's buildPerspectiveMatrix functions

current stable SDK
closed-fixed
nobody
core (61)
5
2021-03-02
2011-07-11
Simon
No

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.

Discussion

  • Michael Zeilfelder

    • status: open --> closed-fixed
    • Group: --> current stable SDK
     
  • Michael Zeilfelder

    Should be fixed in svn trunk since r5771 (most changes in r5769, but that version didn't yet work fully).

     

Log in to post a comment.