Re: Phix While Loop Inside pGUI Main Loop

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...

Pete, is there a way to run a while loop inside pGUI's main thread?

For example, if I wanted to do a high-frame FPS game with GL or somesuch, I'd need a simple while loop inside to manage game state, etc. Is that possible?

I finally stumbled upon the answer while updating some prior code:

Define the Iup IDLE_ACTION function:

IupSetGlobalFunction("IDLE_ACTION", Icallback("idle_cb")) 

That function will be called constantly, when no other events are happening.

Pete, you might want to at least make some reference to this functionality in the Phix/pGUI docs. You also have an example that uses it, gears.exw!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu