Original Post
Hello! So I have my own Matrix4 class and I've implemented a function to setup a projection matrix. Because I will only have this level of math clases in two years, I copied the formula to set up the matrix from MSDN, from the function D3DXMatrixProjectionRH (RH because opengl is right-handed, right?). The thing is, it doesn't work. However, I tryed to copy the D3DXMatrixOrthoRH and this one works.
Quote:Why doesn't my perspercive projection code works? How does glPerspective or such function work? Thanks!
Original post by MSDN! This function uses the following formula to compute the returned matrix. 2*zn/w 0 0 0 0 2*zn/h 0 0 0 0 zf/(zn-zf) -1 0 0 zn*zf/(zn-zf) 0