From ce9559e8c2b69d46cff064241bd9a04c014af44f Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 30 May 2022 13:09:26 -0700 Subject: Changeset: 51 Add integration into the main game --- source/GraphicsTags.cpp | 2 ++ source/GraphicsTags.hpp | 12 ++++++++++++ source/main.cpp | 5 +++++ 3 files changed, 19 insertions(+) (limited to 'source') 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 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 #include +#include + +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::max(); } // namespace Tags + +#include 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"; -- cgit v1.2.3-70-g09d2