From b728f5332a4000b7bc57d45b070d8be52c13e183 Mon Sep 17 00:00:00 2001 From: christophe Date: Thu, 21 Dec 2023 14:18:52 +0100 Subject: [PATCH] Fix GTC_matrix_transform test for C++98 --- test/gtc/gtc_matrix_transform.cpp | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/gtc/gtc_matrix_transform.cpp b/test/gtc/gtc_matrix_transform.cpp index 3d8170fb..d28d4581 100644 --- a/test/gtc/gtc_matrix_transform.cpp +++ b/test/gtc/gtc_matrix_transform.cpp @@ -15,8 +15,8 @@ int test_perspective() Projection = glm::perspectiveLH_ZO(glm::pi() * 0.25f, 4.0f / 3.0f, Near, Far); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Far, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Far, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, 0.f, Eps); @@ -25,8 +25,8 @@ int test_perspective() Projection = glm::perspectiveLH_NO(glm::pi() * 0.25f, 4.0f / 3.0f, Near, Far); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Far, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Far, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, -1.f, Eps); @@ -35,8 +35,8 @@ int test_perspective() Projection = glm::perspectiveRH_ZO(glm::pi() * 0.25f, 4.0f / 3.0f, Near, Far); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Far, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Far, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, 0.f, Eps); @@ -45,8 +45,8 @@ int test_perspective() Projection = glm::perspectiveRH_NO(glm::pi() * 0.25f, 4.0f / 3.0f, Near, Far); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Far, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Far, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, -1.f, Eps); @@ -68,8 +68,8 @@ int test_infinitePerspective() Projection = glm::infinitePerspectiveLH_ZO(glm::pi() * 0.25f, 4.0f / 3.0f, Near); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Inf, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Inf, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, 0.f, Eps); @@ -78,8 +78,8 @@ int test_infinitePerspective() Projection = glm::infinitePerspectiveLH_NO(glm::pi() * 0.25f, 4.0f / 3.0f, Near); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, Inf, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, Inf, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, -1.f, Eps); @@ -88,8 +88,8 @@ int test_infinitePerspective() Projection = glm::infinitePerspectiveRH_ZO(glm::pi() * 0.25f, 4.0f / 3.0f, Near); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Inf, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Inf, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, 0.f, Eps); @@ -98,8 +98,8 @@ int test_infinitePerspective() Projection = glm::infinitePerspectiveRH_NO(glm::pi() * 0.25f, 4.0f / 3.0f, Near); { - glm::vec4 N = Projection * glm::vec4{0.f, 0.f, -Near, 1.f}; - glm::vec4 F = Projection * glm::vec4{0.f, 0.f, -Inf, 1.f}; + glm::vec4 N = Projection * glm::vec4(0.f, 0.f, -Near, 1.f); + glm::vec4 F = Projection * glm::vec4(0.f, 0.f, -Inf, 1.f); N /= N.w; F /= F.w; Error += glm::notEqual(N.z, -1.f, Eps);