├── .gitmodules ├── generator ├── cimguizmo_template.cpp ├── cimguizmo_template.h ├── generator.bat ├── generator.sh ├── generator.lua └── output │ ├── structs_and_enums.lua │ ├── structs_and_enums.json │ ├── definitions.json │ └── definitions.lua ├── README.md ├── LICENSE ├── cimguizmo.h └── cimguizmo.cpp /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ImGuizmo"] 2 | path = ImGuizmo 3 | url = https://github.com/CedricGuillemet/ImGuizmo 4 | -------------------------------------------------------------------------------- /generator/cimguizmo_template.cpp: -------------------------------------------------------------------------------- 1 | #include "imgui.h" 2 | #include "imgui_internal.h" 3 | #include "./ImGuizmo/ImGuizmo.h" 4 | #include "cimguizmo.h" 5 | 6 | 7 | 8 | #include "auto_funcs.cpp" 9 | 10 | 11 | -------------------------------------------------------------------------------- /generator/cimguizmo_template.h: -------------------------------------------------------------------------------- 1 | #ifndef CIMGUIZMO_INCLUDED 2 | #define CIMGUIZMO_INCLUDED 3 | 4 | #include "cimgui.h" 5 | 6 | #ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS 7 | #include "imgui_structs.h" 8 | #else 9 | #endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS 10 | 11 | PLACE_STRUCTS_C 12 | 13 | #include "auto_funcs.h" 14 | 15 | 16 | #endif //CIMGUIZMO_INCLUDED 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cimguizmo 2 | 3 | This is a c-api wrapper for ImGuizmo (https://github.com/CedricGuillemet/ImGuizmo) which is a guizmo for Dear ImGui (https://github.com/ocornut/imgui) 4 | 5 | ImGuizmo is a submodule of this repo. To do generation again in case ImGuizmo is changed, you should update ImGuizmo, make sure that cimgui repository is a sibling folder to this repository folder and execute generator/generator.bat(.sh) 6 | -------------------------------------------------------------------------------- /generator/generator.bat: -------------------------------------------------------------------------------- 1 | :: this script must be executed in this directory 2 | :: all the output goes to generator/output folder 3 | :: .cpp and .h files: 4 | :: cimplot.h and cimplot.cpp with gcc preprocess 5 | :: lua and json files: 6 | :: definitions.lua for function definitions 7 | :: structs_and_enums.lua with struct and enum information-definitions 8 | :: impl_definitions.lua for implementation function definitions 9 | 10 | :: set your PATH if necessary for LuaJIT or Lua5.1 or luajit with: (for example) 11 | set PATH=%PATH%;C:\anima;C:\mingws\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin; 12 | :: set PATH=%PATH%;C:\luaGL;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin; 13 | :: set PATH=%PATH%;C:\luaGL\sources\luajit-master\luajit-master\bin\mingw32;C:\mingw32\bin; 14 | ::process files 15 | :: arg[1] compiler name g++, gcc, clang or cl 16 | :: arg[2] "" or "comments" 17 | luajit ./generator.lua g++ "" 18 | 19 | ::leave console open 20 | cmd /k 21 | 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Victor Bombí 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /generator/generator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # this script must be executed in this directory 4 | # all the output goes to generator/output folder 5 | # .cpp and .h files: 6 | # cimgui.h and cimgui.cpp with gcc preprocess 7 | # cimgui_nopreprocess.h and cimgui_nopreprocess.cpp generated without preprocess 8 | # cimgui_impl.h with implementation function cdefs 9 | # lua and json files: 10 | # definitions.lua for function definitions 11 | # structs_and_enums.lua with struct and enum information-definitions 12 | # impl_definitions.lua for implementation function definitions 13 | 14 | #process files 15 | # arg[1] compiler name gcc, clang, or cl 16 | # arg[2] "" or "comments" 17 | # 18 | 19 | # parse command line arguments 20 | # ref: https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash 21 | POSITIONAL_ARGS=() 22 | 23 | TARGETS="" 24 | 25 | help() { 26 | cat <