From: Richard R. <sf...@ol...> - 2003-09-15 07:44:12
|
On Mon, Sep 15, 2003 at 09:35:06AM +0300, Eero Pajarre wrote: > Richard Rauch wrote: > > >Does the MS-WINDOWS version sleep properly? > > > > Hmm (checking the source code), NO > > But on my (Windows XP) system if I have something > like Seti@home on the background my Freeglut > application does consume approx 0% of CPU if > there are no redisplays or idle functions happening. The idle function gets called at most once per PeekMessage(), so that may undermine some programs using glutIdleFunc(). Perhaps the freeglut API should clarify what can be expected on this point? I replaced *both* sections' if(check-event) with while(check-event). If this is a problem, the MS-WINDOWS section can be undone. I'm going to send a second email with my patches to freeglut_main.c. The MS-WINDOWS version should be unaffected, since I didn't have code for making MS-WINDOWS sleep. > I cannot say if this behaviour is the same on other > versions of Windows, but I think improving it is not > urgent for Windows XP users. (especially as this > does not matter at all if idle functions are used, > (as they are in all my real programs)) > > > btw. related note, I have removed glFlush from my > freeglut_display.c some time ago, with no problems > so far (I am pretty sure that the Classic Glut did > not glFlush) What is the advantage to removing the glFlush() call? However, I tend to agree that this is probably appropriate. The client code should, IMHO, treat any freeglut rendering operations as OpenGL operations, and should be responsible for invoking glFlush() on their own, at appropriate times. -- "I probably don't know what I'm talking about." http://www.olib.org/~rkr/ |