How to use ImGUI

Problems building or running the engine, queries about how to use features etc.
Post Reply
TomBell06
Gnoblar
Posts: 3
Joined: Sun Jul 18, 2021 10:32 pm
x 1

How to use ImGUI

Post by TomBell06 »

Ogre Version: 1.12.12
Operating System: Windows
Render System: DirectX/OpenGL

I'm a massive noob when it comes to Ogre. Does anyone know any resources that explain how to setup and use ImGUI?
loath
Platinum Sponsor
Platinum Sponsor
Posts: 202
Joined: Tue Jan 17, 2012 5:18 am
x 29

Re: How to use ImGUI

Post by loath »

checkout the ImGui sample in samplebrowser.exe.

the sample source is here:
\ogre-1.12\Samples\Simple\include\ImGuiDemo.h
TomBell06
Gnoblar
Posts: 3
Joined: Sun Jul 18, 2021 10:32 pm
x 1

Re: How to use ImGUI

Post by TomBell06 »

Tried to use some of the code from the sample but it just throws unresolved externals errors.
loath
Platinum Sponsor
Platinum Sponsor
Posts: 202
Joined: Tue Jan 17, 2012 5:18 am
x 29

Re: How to use ImGUI

Post by loath »

are you referring to a c++ linker error?
TomBell06
Gnoblar
Posts: 3
Joined: Sun Jul 18, 2021 10:32 pm
x 1

Re: How to use ImGUI

Post by TomBell06 »

Okay the linking error is gone that was just me being stupid. The sample is kind of useless it seems very specific to the sample viewer, and does very little to explain what it's actually doing. Is there not an example of its being used in a traditional Ogre application?
loath
Platinum Sponsor
Platinum Sponsor
Posts: 202
Joined: Tue Jan 17, 2012 5:18 am
x 29

Re: How to use ImGUI

Post by loath »

you're right, the sample is specific to apps created with the OgreBites::ApplicationContext. i'm pretty sure this decision is due to there being a lot of boilerplate to get any dear imgui based app up and running and OgreBites does all this for you. paroj even recently added gamepad support.

all of my internal tools are based on OgreBites::ApplicationContext and it works really well. i'd recommend starting here if you're learning ogre.

on the other hand, my main app existed before OgreBites so it's a "traditional Ogre application" as you describe. in this case i had to add a bunch of infrastructure myself: basically i ripped code from OgreBites, SDL2, and the Dear ImGui dx9 samples to get it up and running. i can post some of that here but it's so integrated around my own codebase so it won't be as helpful.
Post Reply