Skip to content

edherbert/ogre-next-imgui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ogre-next imgui

A Dear ImGui Backend for ogre-next

Screenshot

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.

Including in a Project

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.

Building the Demo

Clone with submodules to ensure you get the imgui dependency:

git clone --recurse-submodules --shallow-submodules https://github.com/edherbert/ogre-next-imgui.git

Linux

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 ..

MacOS

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 ..

Windows

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 ..

Special thanks

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 :)

About

imgui implementation for ogre-next

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published