diff options
| author | Andre Weissflog <floooh@gmail.com> | 2019-08-31 13:40:59 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2019-08-31 13:40:59 +0200 |
| commit | d476a22a51f195976fb6a61a449603125b8cbb9f (patch) | |
| tree | 702885d4eba9fbf1c82499c213f3666c42fdd48b /util | |
| parent | d873507a03e145a0892088263057e51b695fe9ab (diff) | |
sokol_gfx_imgui.h: fix documenetion for merge with sokol_gfx_cimgui.h
Diffstat (limited to 'util')
| -rw-r--r-- | util/README.md | 3 | ||||
| -rw-r--r-- | util/sokol_gfx_imgui.h | 19 |
2 files changed, 14 insertions, 8 deletions
diff --git a/util/README.md b/util/README.md index 11de2cdd..cb3995e5 100644 --- a/util/README.md +++ b/util/README.md @@ -8,8 +8,7 @@ and sometimes also external libraries. - **sokol_imgui.h**: implements a renderer for [Dear ImGui](https://github.com/ocornut/imgui) on top of sokol_gfx.h and sokol_app.h (the latter being optional if you do your own input-forwarding to ImGui), the implementation can be compiled as C++ or C. -- **sokol_gfx_imgui.h**: a debug-inspection UI for sokol_gfx.h, this hooks into the sokol-gfx API and lets you inspect resource objects and captured API callsA -- **sokol_gfx_cimgui.h**: same as sokol_gfx_imgui.h, but using [cimgui](https://github.com/cimgui/cimgui) +- **sokol_gfx_imgui.h**: a debug-inspection UI for sokol_gfx.h, this hooks into the sokol-gfx API and lets you inspect resource objects and captured API calls - **sokol_gl.h**: an OpenGL 1.x style immediate-mode rendering API on top of sokol_gfx.h - **sokol_fontstash.h**: a renderer for [fontstash.h](https://github.com/memononen/fontstash) on diff --git a/util/sokol_gfx_imgui.h b/util/sokol_gfx_imgui.h index 63b5b1bc..f551b284 100644 --- a/util/sokol_gfx_imgui.h +++ b/util/sokol_gfx_imgui.h @@ -5,23 +5,30 @@ Project URL: https://github.com/floooh/sokol Do this: + #define SOKOL_GFX_IMGUI_IMPL - before you include this file in *one* C++ file to create the + + before you include this file in *one* C or C++ file to create the implementation. - NOTE that the implementation must be compiled as C++ or Objective-C++ - because it calls into the ImGui C++ API. The sokol_gfx_imgui.h API - itself is plain C though. + NOTE that the implementation can be compiled either as C++ or as C. + When compiled as C++, sokol_gfx_imgui.h will directly call into the + Dear ImGui C++ API. When compiled as C, sokol_gfx_imgui.h will call + cimgui.h functions instead. Include the following file(s) before including sokol_gfx_imgui.h: sokol_gfx.h - Additionally, include the following files(s) before including - the implementation of sokol_gfx_imgui.h: + Additionally, include the following headers before including the + implementation: + If the implementation is compiled as C++: imgui.h + If the implementation is compiled as C: + cimgui.h + The sokol_gfx.h implementation must be compiled with debug trace hooks enabled by defining: |