diff options
author | rtk0c <[email protected]> | 2022-05-30 13:09:26 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-05-30 13:09:26 -0700 |
commit | ce9559e8c2b69d46cff064241bd9a04c014af44f (patch) | |
tree | 370c793d4fde63f4bd4d988d73a3c4d9353ede56 /source | |
parent | cdd84f25ab1d2a57ee5c7b4c954e35a8d7e2dca3 (diff) |
Changeset: 51 Add integration into the main game
Diffstat (limited to 'source')
-rw-r--r-- | source/GraphicsTags.cpp | 2 | ||||
-rw-r--r-- | source/GraphicsTags.hpp | 12 | ||||
-rw-r--r-- | source/main.cpp | 5 |
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"; |