diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index f496777..5b40395 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -34,6 +34,8 @@ namespace OpenVulkano::Math }; }; + RGB565() : r(0), g(0), b(0) {} + template || std::is_signed_v>> RGB565(const Math::Vector3& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) { @@ -46,10 +48,6 @@ namespace OpenVulkano::Math RGB565(const Math::Vector3_SIMD& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) { } - template || std::is_signed_v>> - RGB565(const Math::Vector4_SIMD& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) - { - } template>> RGB565(const Math::Vector3& color) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) @@ -65,11 +63,6 @@ namespace OpenVulkano::Math : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) { } - template>> - RGB565(const Math::Vector4_SIMD& color) - : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) - { - } uint8_t GetR() { return Unmake5(r); } uint8_t GetG() { return Unmake6(g); } @@ -90,11 +83,6 @@ namespace OpenVulkano::Math { return { GetR(), GetG(), GetB() }; } - template || std::is_signed_v>> - Math::Vector4_SIMD Get4SIMD() - { - return { GetR(), GetG(), GetB(), 1 }; - } template>> Math::Vector3 Get3Normalized() { return { GetRFloat(), GetGFloat(), GetBFloat() }; @@ -108,11 +96,6 @@ namespace OpenVulkano::Math { return { GetRFloat(), GetGFloat(), GetBFloat() }; } - template>> - Math::Vector4_SIMD Get4NormalizedSIMD() - { - return { GetRFloat(), GetGFloat(), GetBFloat(), 1 }; - } void SetR(uint8_t red) { r = Make5(red); } void SetG(uint8_t green) { g = Make6(green); } @@ -219,13 +202,6 @@ namespace OpenVulkano::Math return *this; } - template>> - RGB565& operator=(const Vector4_SIMD& color) - { - SetNormalized(color); - return *this; - } - template || std::is_signed_v>> RGB565& operator+=(const Vector3& color) { @@ -247,13 +223,6 @@ namespace OpenVulkano::Math return *this; } - template || std::is_signed_v>> - RGB565& operator+=(const Vector4_SIMD& color) - { - Set(Get4SIMD() + color); - return *this; - } - template>> RGB565& operator+=(const Vector3& color) { @@ -275,13 +244,6 @@ namespace OpenVulkano::Math return *this; } - template>> - RGB565& operator+=(const Vector4_SIMD& color) - { - SetNormalized(Get4NormalizedSIMD() + color); - return *this; - } - template || std::is_signed_v>> RGB565& operator-=(const Vector3& color) { @@ -303,13 +265,6 @@ namespace OpenVulkano::Math return *this; } - template || std::is_signed_v>> - RGB565& operator-=(const Vector4_SIMD& color) - { - Set(Get4SIMD() - color); - return *this; - } - template>> RGB565& operator-=(const Vector3& color) { @@ -331,13 +286,6 @@ namespace OpenVulkano::Math return *this; } - template>> - RGB565& operator-=(const Vector4_SIMD& color) - { - SetNormalized(Get4NormalizedSIMD() - color); - return *this; - } - bool operator==(const RGB565& other) const { return value == other.value; } bool operator!=(const RGB565& other) const { return value != other.value; } @@ -346,8 +294,6 @@ namespace OpenVulkano::Math template || std::is_signed_v>> operator Math::Vector3() { return Get3(); } template || std::is_signed_v>> - operator Math::Vector4_SIMD() { return Get4SIMD(); } - template || std::is_signed_v>> operator Math::Vector3_SIMD() { return Get3SIMD(); } template>> operator Math::Vector4() { return Get4Normalized(); }