medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 336adfeb4290f9268ab079835c270f81277fe29a
parent ea60036ce44f38f58efd6cbff22274d4ab6933d0
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Nov 13 22:29:54 +0200

GG windows

Diffstat:
linear_algebra.h | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/linear_algebra.h b/linear_algebra.h @@ -549,7 +549,7 @@ forceinline m4 m4_translation( v3 xyz ) { return m4_translation( xyz.x, xyz.y, xyz.z ); } -forceinline m4 m4_ortho( float left, float right, float top, float bottom, float near, float far ) { +forceinline m4 m4_ortho( float left, float right, float top, float bottom, float near_plane, float far_plane ) { return m4( 2.0f / ( right - left ), 0.0f, @@ -563,17 +563,17 @@ forceinline m4 m4_ortho( float left, float right, float top, float bottom, float 0.0f, 0.0f, - -2.0f / ( far - near ), + -2.0f / ( far_plane - near_plane ), 0.0f, ( right + left ) / ( left - right ), ( top + bottom ) / ( bottom - top ), - ( far + near ) / ( near - far ), + ( far_plane + near_plane ) / ( near_plane - far_plane ), 1.0f ); } -forceinline m4 m4_perspective( float vertical_fov_degrees, float aspect_ratio, float near, float far ) { +forceinline m4 m4_perspective( float vertical_fov_degrees, float aspect_ratio, float near_plane, float far_plane ) { float vertical_fov = vertical_fov_degrees * float( M_PI ) / 180.0f / 2.0f; float horizontal_fov = atanf( tanf( vertical_fov ) * aspect_ratio ); @@ -590,12 +590,12 @@ forceinline m4 m4_perspective( float vertical_fov_degrees, float aspect_ratio, f 0.0f, 0.0f, - ( far + near ) / ( near - far ), + ( far_plane + near_plane ) / ( near_plane - far_plane ), -1.0f, 0.0f, 0.0f, - ( 2.0f * far * near ) / ( near - far ), + ( 2.0f * far_plane * near_plane ) / ( near_plane - far_plane ), 0.0f ); }