A portable backend of imgui for projects using ogre-next.
This project works with ogre-next v2.3 and has been shown to work on the following Ogre render systems:
- OpenGL3+
- Metal
- D3D11
- Vulkan
This repo includes an example demo showing how to use the backend.
To include imgui in a project, simply include the contents of src/ImguiOgre
in your build (as well as imgui's sources).
Look through src/OgreNextImguiGameState.cpp
for details of how to use the project in your codebase.
Clone with submodules to ensure you get the imgui dependency:
git clone --recurse-submodules --shallow-submodules https://github.com/edherbert/ogre-next-imgui.git
You must have built Ogre ahead of time.
The cmake project expects Ogre to be present in the directory Dependencies/
, otherwise they can be specified manually:
cmake -DOGRE_SOURCE=/home/user/build/ogre2/ -DOGRE_BINARIES=/home/user/build/ogre2/build/Debug/ ..
make
Note: If you've only built Ogre as Debug, ensure you specify a cmake Debug build so it can correctly find the libraries.
cmake -DOGRE_SOURCE=/home/user/build/ogre2/ -DOGRE_BINARIES=/home/user/build/ogre2/build/Debug/ -DCMAKE_BUILD_TYPE=Debug ..
This project has only been tested with Xcode builds. You are expected to have built Ogre as static libraries, using the flags
-DOGRE_STATIC=TRUE -DOGRE_BUILD_LIBS_AS_FRAMEWORKS=FALSE
Ensure you build for xcode
cmake -DOGRE_SOURCE=/Users/user/build/ogre2/ -DOGRE_BINARIES=/Users/user/build/ogre2/build/Debug/ -GXcode ..
This project has been tested using Visual Studio.
cmake -DOGRE_SOURCE='C:\build\ogre2\' -DOGRE_BINARIES='C:\build\ogre2\build\Debug\' -DCMAKE_BUILD_TYPE=Debug ..
This project contains code taken from a number of sources. I have cleaned it up and added the features I thought were necessary to make it easily useable.
Original implementation: Crashy
Added Metal support: Me
General fixes: Various people
Updated to Ogre2.3: Vian
This imgui backend was floating around in bits and pieces on the Ogre forum, I've simply unified them somwhere. Thanks to all these people :)