openglbook-samples
openglbook-samples copied to clipboard
Chapter 4 : CreateProjectionMatrix : Are the elements 11 and 14 interchanged ?
Congratulations for the OpenGLBook, it is a wonderful tool.
I was reviewing the CreateProjectionMatrix (in the Utils.c file) and I found that the elements 11 and 14 are interchanged if we compare with the formula.
Please, let me know if there is an issue or I am missing something.
out.m[0] = x_scale; out.m[5] = y_scale; out.m[10] = -((far_plane + near_plane) / frustum_length); out.m[11] = -1; out.m[14] = -((2 * near_plane * far_plane) / frustum_length);
Best Regards
Juan Carlos