add helper functions to FontAtlasType

This commit is contained in:
ohyzha
2025-01-22 17:06:03 +02:00
parent c81e63a8ff
commit f50bbc798e

View File

@@ -40,6 +40,10 @@ namespace OpenVulkano::Scene
[[nodiscard]] constexpr uint32_t GetChannelCount() const { return CHANNEL_COUNT[static_cast<int>(m_type)]; }
[[nodiscard]] constexpr bool IsSDF() const { return m_type == SDF || m_type == MSDF; }
[[nodiscard]] constexpr bool IsBitmap() const { return m_type == BITMAP || m_type == BITMAP_SUBPIXEL; }
[[nodiscard]] constexpr operator Type() const { return m_type; }
[[nodiscard]] constexpr auto operator<=>(const FontAtlasType rhs) const { return m_type <=> rhs.m_type; }