BASIC

Author Topic: Immediate Mode GUI  (Read 18379 times)

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #30 on: 2012-Jun-22 »
I'll probably replace DDGui with IMGui for my TSetup system (only use GUI for options and language selection) :)

Got a lot of work left to do yet :)

Offline Slim

  • Mc. Print
  • *
  • Posts: 12
    • View Profile
Re: Immediate Mode GUI
« Reply #31 on: 2012-Jun-23 »
take courage, lots of people like and will use, just not too many bother to comment.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: Immediate Mode GUI
« Reply #32 on: 2012-Aug-05 »
Thinking of giving this GUI a wee go, how have people gotten on with it, did it work out well for you?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

MrTAToad

  • Guest
Re: Immediate Mode GUI
« Reply #33 on: 2012-Aug-06 »
I haven't really used it yet - would have to make sure its all in an extended type first :)

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Immediate Mode GUI
« Reply #34 on: 2012-Aug-06 »
I can't decide if you want to use it or not, but I can tell my story with IMGUI.
I read Sol's tutorial about it and then ported to GLBasic and I'm truly impressed what effective IMGUI is.
You work with a very small codebase and only the basic Widgets (scrollbar, button, textfield) and then you can easily expand the basic Widgets to complex ones (Combo box, drop down menu, tree-list, tabs, radio buttons, windows, complet forms).
You don't need to inicialize the widgets (no need to create a button) only use it. You don't store any data in the widgets so not need to update them if a value changed externally.
There are some fundamental difference beetween IMGUI and RMGUI (like DDGUI).
With RMGUI you need:
1. Create widgets
2. Update widgets to reflect internal state of application
3. Update internal state of application to reflect state of widgets
4. Destroy widgets.

With IMGUI you only need:
1. Use widget with internal state of application

You calculate, render and check an IMGUI widget in every frame, so it uses more CPU than RMGUI, but IMGUI mostly used in games, where FPS targetted 40-60 FPS and only with a few widgets at once, so this is not a problem overall.

An excellent writing about IMGUI with code examples: http://www.johno.se/book/imgui.html

I found some really nice BlitzBasic and C++ IMGUI sources, there are a lot of good idea in these I want to port to GLBasic (automatic layout for example).

I found out that NVidia implemented its own IMGUI which it using in it's demos: http://code.google.com/p/nvidia-widgets/
Also Unity using IMGUI since Unity 2.5 (2009), and they said that working with IMGUI was a very pleaseful job:
« Last Edit: 2012-Aug-06 by Albert »

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: Immediate Mode GUI
« Reply #35 on: 2012-Aug-06 »
Thanks for the replies guys.

Well, it looks good, I had a wee look at the code and it's quite well internally documented and very readable. I don't often use 3rd party code but this looks like a genuine time saver for me. As I said the code looks good and I should be able to modify any bits that I need customised for my particular needs.

Thanks Albert!  :)

P.S. May I suggest that you place the latest version in the first post, to save any confusion which is the latest one.
« Last Edit: 2012-Aug-06 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Immediate Mode GUI
« Reply #36 on: 2014-Oct-27 »
Just found this (C++) https://github.com/ocornut/imgui

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: Immediate Mode GUI
« Reply #37 on: 2014-Oct-28 »
Very interesting as it's got slim external requirements and no render API dependence, so in theory it could be mad to work withing GLB.?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)