From 95f366344a6019ffe6664470be991cf62f0a11a5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 28 Apr 2017 10:38:31 +0100 Subject: [PATCH] Rename parameters near/far to avoid conflicts with macros from windows.h --- renderdoc/maths/matrix.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/renderdoc/maths/matrix.cpp b/renderdoc/maths/matrix.cpp index 515e73996..0173013e5 100644 --- a/renderdoc/maths/matrix.cpp +++ b/renderdoc/maths/matrix.cpp @@ -288,7 +288,7 @@ Matrix4f Matrix4f::RotationXYZ(const Vec3f &rot) return R.GetMatrix(); } -Matrix4f Matrix4f::Orthographic(const float near, const float far) +Matrix4f Matrix4f::Orthographic(const float Near, const float Far) { float L = -10.0f; float R = 10.0f; @@ -296,10 +296,10 @@ Matrix4f Matrix4f::Orthographic(const float near, const float far) float T = 10.0f; float B = -10.0f; - float N = -fabsf(far - near) * 0.5f; - float F = fabsf(far - near) * 0.5f; + float N = -fabsf(Far - Near) * 0.5f; + float F = fabsf(Far - Near) * 0.5f; - if(far < near) + if(Far < Near) { float tmp = F; F = N;