#pragma once #include #include #include namespace Nz { template concept Enum = std::is_enum_v; template TEnum EnumFromString(std::string_view) { return TEnum{}; } #define DEF_ENUM(Type) \ NAZARA_CORE_API std::string_view EnumToString(Type t); \ NAZARA_CORE_API Type EnumFromString_##Type(std::string_view); \ template<> inline Type EnumFromString(std::string_view v) { return EnumFromString_##Type(v); } DEF_ENUM(AnimationType); DEF_ENUM(BlendEquation); DEF_ENUM(BlendFunc); DEF_ENUM(BufferAccess); DEF_ENUM(BufferType); DEF_ENUM(BufferUsage); DEF_ENUM(ComponentType); DEF_ENUM(CoordSys); DEF_ENUM(CursorPosition); DEF_ENUM(CubemapFace); DEF_ENUM(DataStorage); DEF_ENUM(ErrorMode); DEF_ENUM(ErrorType); DEF_ENUM(FaceFilling); DEF_ENUM(FaceCulling); DEF_ENUM(FrontFace); DEF_ENUM(ImageType); DEF_ENUM(IndexType); DEF_ENUM(HashType); DEF_ENUM(OpenMode); DEF_ENUM(ParameterType); DEF_ENUM(PixelFormatContent); DEF_ENUM(PixelFormat); DEF_ENUM(PixelFormatSubType); DEF_ENUM(PixelFlipping); DEF_ENUM(PrimitiveMode); DEF_ENUM(PrimitiveType); DEF_ENUM(ProcessorCap); DEF_ENUM(ProcessorVendor); DEF_ENUM(RendererComparison); DEF_ENUM(ResourceLoadingError); DEF_ENUM(SamplerFilter); DEF_ENUM(SamplerMipmapMode); DEF_ENUM(SamplerWrap); DEF_ENUM(SphereType); DEF_ENUM(StencilOperation); DEF_ENUM(StreamOption); DEF_ENUM(TextAlign); DEF_ENUM(TextStyle); DEF_ENUM(VertexComponent); DEF_ENUM(VertexInputRate); DEF_ENUM(VertexLayout); #undef DEF_ENUM }