aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/GraphicsTags.cpp2
-rw-r--r--source/GraphicsTags.hpp12
-rw-r--r--source/main.cpp5
3 files changed, 19 insertions, 0 deletions
diff --git a/source/GraphicsTags.cpp b/source/GraphicsTags.cpp
index b389acf..522a58f 100644
--- a/source/GraphicsTags.cpp
+++ b/source/GraphicsTags.cpp
@@ -306,3 +306,5 @@ GLenum Tags::FindGLType(std::string_view name) {
return GL_NONE;
}
}
+
+#include <generated/GraphicsTags.gs.inl>
diff --git a/source/GraphicsTags.hpp b/source/GraphicsTags.hpp
index 34c0885..09e62bf 100644
--- a/source/GraphicsTags.hpp
+++ b/source/GraphicsTags.hpp
@@ -5,6 +5,16 @@
#include <string>
#include <string_view>
+#include <MacrosCodegen.hpp>
+
+enum TestEnum {
+ TE_Position,
+ TE_Color,
+ TE_TexCoord,
+ TE_COUNT,
+};
+BRUSSEL_ENUM(TestEnum, ToString FromString ExcludeHeuristics);
+
namespace Tags {
/// Vertex element semantics, used to identify the meaning of vertex buffer contents
enum VertexElementSemantic {
@@ -96,3 +106,5 @@ GLenum FindGLType(std::string_view name);
constexpr GLuint kInvalidLocation = std::numeric_limits<GLuint>::max();
} // namespace Tags
+
+#include <generated/GraphicsTags.gh.inl>
diff --git a/source/main.cpp b/source/main.cpp
index c49fc0b..353746b 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -3,9 +3,11 @@
#include "AppConfig.hpp"
#include "CommonVertexIndex.hpp"
#include "EditorGuizmo.hpp"
+#include "GraphicsTags.hpp"
#include "Ires.hpp"
#include "Level.hpp"
#include "Material.hpp"
+#include "Metadata.hpp"
#include "Shader.hpp"
#define GLFW_INCLUDE_NONE
@@ -102,6 +104,9 @@ fs::path GetEnvVar(const char* name, const char* backup) {
int main(int argc, char* argv[]) {
using namespace Tags;
+ auto str = Metadata::EnumToString(TE_Color);
+ printf("%.*s", PRINTF_STRING_VIEW(str));
+
constexpr auto kImGuiBackend = "imgui-backend";
constexpr auto kGameDataDir = "game-data-directory";
constexpr auto kGameAssetDir = "game-asset-directory";