This is the backend for using Dear ImGui on OpenSiv3D project.
OpenSiv3DプロジェクトでDear ImGuiを使用するためのバックエンドです。
-
Copy all files in
src/directory into your projectsrc/ディレクトリ内の全ファイルをプロジェクトにコピー -
Add the addon to Main.cpp as shown below
下記のようにアドオンをMain.cppに追加
#include <Siv3D.hpp> + #include "DearImGuiAddon.hpp" void Main() { + Addon::Register<DearImGuiAddon>(U"ImGui"); while (System::Update()) { ... } }
-
Declare windows inside the while loop
whileループ内でウィンドウを宣言
#include <Siv3D.hpp> #include "DearImGuiAddon.hpp" void Main() { Addon::Register<DearImGuiAddon>(U"ImGui"); while (System::Update()) { + ImGui::ShowDemoWindow(); // Demo Window ... } }
- Dear ImGui v1.92 or higher / Dear ImGui v1.92以降
- OpenSiv3D v0.6.16 or higher / OpenSiv3D v0.6.16以降
Note
For Dear ImGui versions prior to v1.90, please use this version:
Dear ImGui v1.90以前のバージョンはこちらを利用してください:
https://gist.github.com/sthairno/887740c5ec1a8857e66e30ba179fdc3b