adding documentation

This commit is contained in:
Micon Frink
2020-10-29 16:31:38 +00:00
parent 06f3c006c3
commit 3b01e79d6d
3 changed files with 4 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ Notes:
# using generator # using generator
```
* this is only needed (before compilation) if you want an imgui version different from the one provided, otherwise generation is already done. * this is only needed (before compilation) if you want an imgui version different from the one provided, otherwise generation is already done.
* you will need LuaJIT (https://github.com/LuaJIT/LuaJIT.git better 2.1 branch) or precompiled for linux/macOS/windows in https://luapower.com/luajit/download * you will need LuaJIT (https://github.com/LuaJIT/LuaJIT.git better 2.1 branch) or precompiled for linux/macOS/windows in https://luapower.com/luajit/download
* you need to use also a C++ compiler for doing preprocessing: gcc (In windows MinGW-W64-builds for example), clang or cl (MSVC). (this repo was done with gcc) * you need to use also a C++ compiler for doing preprocessing: gcc (In windows MinGW-W64-builds for example), clang or cl (MSVC). (this repo was done with gcc)
@@ -40,6 +41,7 @@ Notes:
* edit config_generator.lua for adding includes needed by your chosen backends (vulkan needs that). * edit config_generator.lua for adding includes needed by your chosen backends (vulkan needs that).
* Run generator.bat or generator.sh with gcc, clang or cl and LuaJIT on your PATH. * Run generator.bat or generator.sh with gcc, clang or cl and LuaJIT on your PATH.
* as a result some files are generated: `cimgui.cpp`, `cimgui.h` and `cimgui_impl.h` for compiling and some lua/json files with information about the binding: `definitions.json` with function info, `structs_and_enums.json` with struct and enum info, `impl_definitions.json` with functions from the backends info. * as a result some files are generated: `cimgui.cpp`, `cimgui.h` and `cimgui_impl.h` for compiling and some lua/json files with information about the binding: `definitions.json` with function info, `structs_and_enums.json` with struct and enum info, `impl_definitions.json` with functions from the backends info.
* You can pass compiler flags to generator.sh or generator.bat at the end ofthe call to further specify the compiler behavior. (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32)
# generate binding # generate binding
* C interface is exposed by cimgui.h when you define CIMGUI_DEFINE_ENUMS_AND_STRUCTS * C interface is exposed by cimgui.h when you define CIMGUI_DEFINE_ENUMS_AND_STRUCTS

View File

@@ -17,7 +17,7 @@ set PATH=%PATH%;C:\anima;C:\mingws\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\min
:: arg[1] compiler name gcc, clang or cl :: arg[1] compiler name gcc, clang or cl
:: arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation :: arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation
:: examples: "" "internal" "internal freetype" :: examples: "" "internal" "internal freetype"
:: arg[3..n] name of implementations to generate :: arg[3..n] name of implementations to generate and/or CLFLAGS (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32)
luajit ./generator.lua gcc "internal" glfw opengl3 opengl2 sdl luajit ./generator.lua gcc "internal" glfw opengl3 opengl2 sdl
::leave console open ::leave console open

View File

@@ -15,5 +15,5 @@
# arg[1] compiler name gcc, clang, or cl # arg[1] compiler name gcc, clang, or cl
# arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation # arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation
# examples: "" "internal" "internal freetype" # examples: "" "internal" "internal freetype"
# arg[3..n] name of implementations to generate # arg[3..n] name of implementations to generate and/or CLFLAGS (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32)
luajit ./generator.lua gcc "internal" glfw opengl3 opengl2 sdl luajit ./generator.lua gcc "internal" glfw opengl3 opengl2 sdl