Historical forum-msg-id-133851-edit, Revision 2

Original date:2019-05-15 08:56:17 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 openGL, something that I don't know anything about, so I haven't written any demos for openGL.

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu