rgb565 vec4_simd removal
This commit is contained in:
@@ -34,6 +34,8 @@ namespace OpenVulkano::Math
|
||||
};
|
||||
};
|
||||
|
||||
RGB565() : r(0), g(0), b(0) {}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
RGB565(const Math::Vector3<T>& 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<T>& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r))
|
||||
{
|
||||
}
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
RGB565(const Math::Vector4_SIMD<T>& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r))
|
||||
{
|
||||
}
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565(const Math::Vector3<T>& 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<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565(const Math::Vector4_SIMD<T>& 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<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
Math::Vector4_SIMD<T> Get4SIMD()
|
||||
{
|
||||
return { GetR(), GetG(), GetB(), 1 };
|
||||
}
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>> Math::Vector3<T> Get3Normalized()
|
||||
{
|
||||
return { GetRFloat(), GetGFloat(), GetBFloat() };
|
||||
@@ -108,11 +96,6 @@ namespace OpenVulkano::Math
|
||||
{
|
||||
return { GetRFloat(), GetGFloat(), GetBFloat() };
|
||||
}
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
Math::Vector4_SIMD<T> 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<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565& operator=(const Vector4_SIMD<T>& color)
|
||||
{
|
||||
SetNormalized(color);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
RGB565& operator+=(const Vector3<T>& color)
|
||||
{
|
||||
@@ -247,13 +223,6 @@ namespace OpenVulkano::Math
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
RGB565& operator+=(const Vector4_SIMD<T>& color)
|
||||
{
|
||||
Set(Get4SIMD<T>() + color);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565& operator+=(const Vector3<T>& color)
|
||||
{
|
||||
@@ -275,13 +244,6 @@ namespace OpenVulkano::Math
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565& operator+=(const Vector4_SIMD<T>& color)
|
||||
{
|
||||
SetNormalized(Get4NormalizedSIMD<T>() + color);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
RGB565& operator-=(const Vector3<T>& color)
|
||||
{
|
||||
@@ -303,13 +265,6 @@ namespace OpenVulkano::Math
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
RGB565& operator-=(const Vector4_SIMD<T>& color)
|
||||
{
|
||||
Set(Get4SIMD<T>() - color);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565& operator-=(const Vector3<T>& color)
|
||||
{
|
||||
@@ -331,13 +286,6 @@ namespace OpenVulkano::Math
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
RGB565& operator-=(const Vector4_SIMD<T>& color)
|
||||
{
|
||||
SetNormalized(Get4NormalizedSIMD<T>() - 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<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
operator Math::Vector3<T>() { return Get3<T>(); }
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
operator Math::Vector4_SIMD<T>() { return Get4SIMD<T>(); }
|
||||
template<typename T, typename = std::enable_if_t<std::is_unsigned_v<T> || std::is_signed_v<T>>>
|
||||
operator Math::Vector3_SIMD<T>() { return Get3SIMD<T>(); }
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
operator Math::Vector4<T>() { return Get4Normalized<T>(); }
|
||||
|
||||
Reference in New Issue
Block a user