Original date:2019-05-15 09:49:29 Edited by: irv Subject: Re: Phix While Loop Inside pGUI Main Loop

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 guess I could assign that to another thread, though, and leave the main for GUI processing, but even then... can I do that without a timer?

Along those lines:

GTK has two "event handlers" - one "fires off" every x milliseconds, which you choose when writing the program, the other runs as fast as the processor can go , calling your Eu game function(s) whenever there isn't input from the user or a graphic update to be done.

The second would be a likely candidate for a game. EuGTK also has an openGL "container", but openGL is something that I don't know anything about, so I haven't written any demos for openGL. A wrapper for openGL calls would have to be written (or borrowed from some other language).

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu