GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: Schranz0r on 2021-Feb-14

Title: imGUI for GLBasic
Post by: Schranz0r on 2021-Feb-14
Hey guys,

i'm working on a imGUI implementation for GLBasic!
It works, and with some tweeking it can be multiplatform as well.
You can use the normal GLB-Stuff and put the GUI on top of it.

Code for this Demo example:
Code (glbasic) Select

GUI_INIT()

WHILE TRUE

    PRINT "Hello World!", 10, 10

    GUI_NewFrame()
    GUI_ShowDemoWindow()
    GUI_Render()

SHOWSCREEN
WEND

GUI_DestroyContext()
GUI_Shutdown()

END


This DEMO is part of imGUI. From now on u can use the c/c++ part right away.
The other things need to wrapped into GLB.

Linkeroptions:
Projects->Options->Add to the Ink-Field: -L"imgui"

Attached a screen and the project to test :)

IMPORTANT:
You have to install the Headerfiles for GLBasic! http://www.glbasic.com/files/headers.rar
Use the ESC-Key to exit the program, if you close with the X it can stay in the background... have to sort this bug out :/
Title: Re: imGUI for GLBasic
Post by: SnooPI on 2021-Feb-16
It looks cool Schranz0r! 
I haven't tested it yet (I'm tired) but why don't you make a wrapper in the form of a library instead?
It seems to me that then it would be easier to import the functions with the GLB IMPORT function... no?  O_O

I would look at this more carefully once tested completely... good job!  :good:

Title: Re: imGUI for GLBasic
Post by: MrPlow on 2021-Feb-16
Looks super!
Title: Re: imGUI for GLBasic
Post by: erico on 2021-Feb-18
Looks superb!
Title: Re: imGUI for GLBasic
Post by: Marmor on 2021-Feb-20
looks cool <3