Re: AutoOpenGl Plugin
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
Yes, now it works fine. http://www.autoitscript.com/forum/index.php?showtopic=37385&st=60 CPU eater was killed! :-) Thanx, Percy. Valery >Updated again... 25/12/2006 >Any opinion? Please, post here!!!! --- In [email protected], "valery_vi" <shehrer1@...> wrote: > > The CPU time eater is here: > > // Main routine - thread callback > DWORD __stdcall __MainLoop( void* Param ) > { > g_WinConfig.CreateGlWindow( ); > > glutDisplayFunc( __Draw ); > glutReshapeFunc( __WindowResize ); > glutIdleFunc( __Draw ); > glutMainLoop( ); > > return 0; > } > > Call of glutIdleFunc() initiates the waste action (draw) which was > already implemented by calling glutDisplayFunc() (above). > > Description of glutIdleFunc() is the following: > http://www.opengl.org/resources/libraries/glut/spec3/node63.html > > "... > > glutIdleFunc sets the global idle callback to be func so a GLUT > program can perform background processing tasks or continuous > animation when window system events are not being received. If > enabled, the idle callback is continuously called when events are > not being received. The callback routine has no parameters. The > current window and current menu will not be changed before the idle > callback. Programs with multiple windows and/or menus should > explicitly set the current window and/or current menu and not rely > on its current setting. > > The amount of computation and rendering done in an idle callback > should be minimized to avoid affecting the program's interactive > response. In general, not more than a single frame of rendering > should be done in an idle callback. > > Passing NULL to glutIdleFunc disables the generation of the idle > callback. " > > Simple solution to free CPU is to replace > > glutIdleFunc( __Draw ); > > to > > glutIdleFunc( NULL ); > > Script with rendering of this sort will make autorotation the Earth > very easy and smoothly, I think. > :-) > > Regards, > Valery > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > New version (10 Dec 2006) from Au3GlPlugin.zip works fine for me. > > But glutMainLoop() eats CPU time very much (98%-99%)! > > Is there any way to reduce this great job? > > > > Valery > > > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > > > BTW this zombe isn't zombie: > > > "When a program forks and the child finishes before the parent" > > > That child is running after AutoIt script finished. It would be > > > demon because it is background process that does not belong to a > > > terminal session. But this process would be service for Windows. > > So > > > this process is zombe - AutoIt son without parent, which is > AutoIt > > > script, I think. > > > > > > Valery > > > > > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > > > > > Hi, > > > > > > > > I have one small problem with it. You should kill AutoIt's > zombe > > > > (98% CPU used) after exit from OpenGl Plugin scripts. > > > > Is there auto solution to reduce CPU work and kill AutoIt's > > zombe? > > > > > > > > Valery > > > > > > > > > > > > > > > > --- In [email protected], "valery_vi" <shehrer1@> > wrote: > > > > > > > > > > Hi, > > > > > > > > > > There is interesting topic of AutoItScript forum: > > > > > > > > > > "OpenGl Plugin Experiment, An opengl plugin that uses glut32" > > > > > http://www.autoitscript.com/forum/index.php? > > showtopic=37385&st=0 > > > > > > > > > > I like it. > > > > > > > > > > Maybe it's time to autorotate the Earth. > > > > > > > > > > Valery > > > > > > > > > > > > > > >