Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!swatsun!swatsun!gessel From: gessel@ilium.cs.swarthmore.edu (Daniel Mark Gessel) Newsgroups: comp.sys.next Subject: Re: main event loop Message-ID: Date: 12 Mar 91 23:22:17 GMT References: <228@qt.cs.utexas.edu> <1991Mar11.080607.26410@agate.berkeley.edu> Sender: news@cs.swarthmore.edu Organization: Swarthmore College, Swarthmore Pa. Lines: 28 In-Reply-To: izumi@fugitive.berkeley.edu's message of 11 Mar 91 08:06:07 GMT Nntp-Posting-Host: ilium In article <1991Mar11.080607.26410@agate.berkeley.edu> izumi@fugitive.berkeley.edu (Izumi Ohzawa) writes: In article <228@qt.cs.utexas.edu> tph@cs.utexas.edu (Pow-Hwee Tan) writes: > > Specifically, I would like a routine I wrote to be called each time >through the main event loop. I have tried using DPSAddTimedEntry with an >interval of 0, but the animation done by the routine called is still jerky. >While the 'jerkiness' may not be avoided totally with a heavy load, I would >still prefer a more direct call from the main event loop to my routine. Apologies if you know this already, but do you have NXPing(); NXPing() is critical, but check out the BreakApp code. It creates it's own main loop and peeks at the next event. If there's nothing critical, it knows it can keep on drawing without haveing to handle an event. If there's an event it doesn't know what to do with, it get's out of the loop and let's the app handle it. This seems a really clean way to deal with tightening up an animation loop, although NXPing is what you really need for the jerkiness. See the BreakApp code for more info . . . Dan -- Daniel Mark Gessel Internet: gessel@cs.swarthmore.edu I do not speak (nor type) representing Swarthmore College.