From 98d8543334fd825bf04d835312d62c9174a90906 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sun, 3 Jul 2022 15:33:15 +0200 Subject: [PATCH] Fix compilation --- Source/Engine/Core/Math/Vector3.cpp | 30 +++++++++++++++++++ .../GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp | 5 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Core/Math/Vector3.cpp b/Source/Engine/Core/Math/Vector3.cpp index 535afead8..8571df57e 100644 --- a/Source/Engine/Core/Math/Vector3.cpp +++ b/Source/Engine/Core/Math/Vector3.cpp @@ -206,6 +206,18 @@ void Float3::Transform(const Float3& vector, const Matrix3x3& transform, Float3& vector.X * transform.M13 + vector.Y * transform.M23 + vector.Z * transform.M33); } +template<> +void Float3::Transform(const Float3& vector, const ::Transform& transform, Float3& result) +{ +#if USE_LARGE_WORLDS + Vector3 tmp; + transform.LocalToWorld(vector, tmp); + result = tmp; +#else + transform.LocalToWorld(vector, result); +#endif +} + template<> Float3 Float3::Transform(const Float3& vector, const Matrix& transform) { @@ -508,6 +520,18 @@ void Double3::Transform(const Double3& vector, const Matrix3x3& transform, Doubl vector.X * transform.M13 + vector.Y * transform.M23 + vector.Z * transform.M33); } +template<> +void Double3::Transform(const Double3& vector, const ::Transform& transform, Double3& result) +{ +#if USE_LARGE_WORLDS + transform.LocalToWorld(vector, result); +#else + Vector3 tmp; + transform.LocalToWorld(vector, tmp); + result = tmp; +#endif +} + template<> Double3 Double3::Transform(const Double3& vector, const Matrix& transform) { @@ -759,6 +783,12 @@ void Int3::Transform(const Int3& vector, const Matrix3x3& transform, Int3& resul result = vector; } +template<> +void Int3::Transform(const Int3& vector, const ::Transform& transform, Int3& result) +{ + result = vector; +} + template<> Int3 Int3::Transform(const Int3& vector, const Matrix& transform) { diff --git a/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp b/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp index 2ce5e1592..e46786b0d 100644 --- a/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp +++ b/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp @@ -215,7 +215,10 @@ static VKAPI_ATTR VkBool32 VKAPI_PTR DebugUtilsCallback(VkDebugUtilsMessageSever while (handleStart != nullptr) { while (*handleStart != ' ' && *handleStart != 0) - *handleStart++ = Math::Clamp(*handleStart, '0', 'z'); + { + *handleStart = Math::Clamp(*handleStart, '0', 'z'); + handleStart++; + } if (*handleStart == 0) break; handleStart = (char*)StringUtils::FindIgnoreCase(handleStart, "0x");