[2.1] MyGui updated and working
-
Slicky
- Bronze Sponsor

- Posts: 614
- Joined: Mon Apr 14, 2003 11:48 pm
- Location: Was LA now France
- x 26
[2.1] MyGui updated and working
This is a fix that is not mine. I basically applied a patch that was submitted but not applied by al2950. I have been hassling to get the latest Ogre 2.1 to work with MyGui so now it works (at least for me). I have only done the GL3+ part so far. I will add more or someone else can help.
My fork is here: https://github.com/Stuggy/mygui
Make sure you use the pulldown to choose the Ogre2.1 branch before you clone.
I hope it is useful to someone. It has taken me days to try and get GUI stuff working.
It would be nice if someone could do a similar thing with for example ImGui using the latest 2.1.
My fork is here: https://github.com/Stuggy/mygui
Make sure you use the pulldown to choose the Ogre2.1 branch before you clone.
I hope it is useful to someone. It has taken me days to try and get GUI stuff working.
It would be nice if someone could do a similar thing with for example ImGui using the latest 2.1.
-
rujialiu
- Goblin
- Posts: 296
- Joined: Mon May 09, 2016 8:21 am
- x 35
Re: [2.1] MyGui updated and working
I've integrated ImGui to Ogre 2.2 without any trouble. However, I haven't done it with Ogre 2.1 because it looks harder and I don't really need itSlicky wrote: Sat Sep 08, 2018 11:19 am It would be nice if someone could do a similar thing with for example ImGui using the latest 2.1.
-
Slicky
- Bronze Sponsor

- Posts: 614
- Joined: Mon Apr 14, 2003 11:48 pm
- Location: Was LA now France
- x 26
Re: [2.1] MyGui updated and working
I need to see how to get 2.2 I just found 2.1 and don't remember seeing 2.2.
Anyway, is there anything special to share as far as getting it to work?
Anyway, is there anything special to share as far as getting it to work?
-
rujialiu
- Goblin
- Posts: 296
- Joined: Mon May 09, 2016 8:21 am
- x 35
Re: [2.1] MyGui updated and working
It's in 2-2-WIP branch. It's (almost) fully functional, quite stable for my software(no crashes or other weird things), but very few people are using it so it's still considered WIP.Slicky wrote: Wed Sep 12, 2018 4:12 pm I need to see how to get 2.2 I just found 2.1 and don't remember seeing 2.2.
Anyway, is there anything special to share as far as getting it to work?
Integrating ImGui to Ogre 2.2 is very easy: just save API context (DX11 in our case), call ImGui's render functions and restore API context. That's all. Ogre 2.2 provided easy helpers for doing this. I don't know whether Ogre 2.1 can be done equaly easily though.
I can post some codes tomorrow (when I'm back to my office) if you want.
-
Slicky
- Bronze Sponsor

- Posts: 614
- Joined: Mon Apr 14, 2003 11:48 pm
- Location: Was LA now France
- x 26
Re: [2.1] MyGui updated and working
Yes please I would like that. I started this thread about MyGui but I have also been struggling with ImGui and would appreciate any help.
-
Jay721
- Halfling
- Posts: 62
- Joined: Mon Jan 29, 2018 8:19 am
Re: [2.1] MyGui updated and working
I got MyGUI working on 2.1 now. I built MyGUI with FreeType, and it works in the demos. However, when integrating MyGUI with my application, I'm getting
????
Code: Select all
Core | Error | ResourceTrueTypeFont: TrueType font 'DejaVuSansFont_15' disabled. Define MYGUI_USE_FREETYE if you need TrueType fonts????
-
Slicky
- Bronze Sponsor

- Posts: 614
- Joined: Mon Apr 14, 2003 11:48 pm
- Location: Was LA now France
- x 26
Re: [2.1] MyGui updated and working
I think put that define into your app also. I don't think I have it in mine but it suggests that.
-
rujialiu
- Goblin
- Posts: 296
- Joined: Mon May 09, 2016 8:21 am
- x 35
Re: [2.1] MyGui updated and working
I've started a separate thread because this thread is supposed to be about MyGui, right?Slicky wrote: Wed Sep 12, 2018 4:23 pm Yes please I would like that. I started this thread about MyGui but I have also been struggling with ImGui and would appreciate any help.
-
Slicky
- Bronze Sponsor

- Posts: 614
- Joined: Mon Apr 14, 2003 11:48 pm
- Location: Was LA now France
- x 26
Re: [2.1] MyGui updated and working
I noticed today that when I enable MyGui with a few widgets the FPS hit seems more than I would have expected. I'm only using debug mode so far. FPS goes from around 221 to around 155.
I am enabling and disabling it by toggling this line:
I wonder is it the way I have implemented it or is it normal to see a drop like this.
I am enabling and disabling it by toggling this line:
Code: Select all
// pCompositorManager->addWorkspace(mSceneManager, mRenderWindow, mCamera, workspaceNameHash, true);- dark_sylinc
- OGRE Team Member

- Posts: 5586
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1413
- Contact:
Re: [2.1] MyGui updated and working
Please notice that a drop from 221 to 155 fps means 1.92ms.
If the app were to be running at 60 fps, that drop would lower your framerate to 53.78 fps
This may be what's expected if the widget covers the whole screen or there's too much overdraw and the GPU isn't superpowerful (e.g. mid to low end GPU, specially Intel GPUs), but certainly not normal for high end GPUs (e.g. GeForce 1080, Radeon Vega64).
If the app were to be running at 60 fps, that drop would lower your framerate to 53.78 fps
This may be what's expected if the widget covers the whole screen or there's too much overdraw and the GPU isn't superpowerful (e.g. mid to low end GPU, specially Intel GPUs), but certainly not normal for high end GPUs (e.g. GeForce 1080, Radeon Vega64).
-
Slicky
- Bronze Sponsor

- Posts: 614
- Joined: Mon Apr 14, 2003 11:48 pm
- Location: Was LA now France
- x 26
Re: [2.1] MyGui updated and working
I was also wondering that debug mode adds more time vs release. I haven't configured a release build yet. For now I'll assume based upon what you said that it is normal. Card is GeForce 1050ti.
-
al2950
- OGRE Expert User

- Posts: 1227
- Joined: Thu Dec 11, 2008 7:56 pm
- Location: Bristol, UK
- x 157
Re: [2.1] MyGui updated and working
If you are asking why debug is slower than release, its fairly extensive answer. In theory if all code was written perfectly with performance in mind, then debug would be almost as quick as release. However the reality is debug, for many developers, is expected to be slow. The std:: lib is pretty bad in debug, as it adds a bunch of checking during debug which can be useful, but causes fairly hefty performance penalties. This is why many game studios have their own version of the std:: library.Slicky wrote: Thu Nov 01, 2018 3:05 pm I was also wondering that debug mode adds more time vs release. I haven't configured a release build yet. For now I'll assume based upon what you said that it is normal. Card is GeForce 1050ti.
Basically dont even bother looking at performance figures in debug. (However be a good developer and dont ever think "Well the compiler will optimize that for me"!)