RE: [GD-Windows] .NET main loop
Brought to you by:
vexxed72
From: tweety <mi...@sy...> - 2004-02-19 02:21:39
|
Thanks. I've been looking for the idle event for some time now :) ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 =20 -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Jacobo Rodriguez Sent: February 18, 2004 2:23 AM To: gam...@li... Subject: Re: [GD-Windows] .NET main loop You have an alternative method to do the main loop. You can insert a delegate that executes in the idle time of the form. Here are an example = but it's write on C# (I use C++ managed too, but with opengl instead dx) http://xplsv.com/blogs/devdiary/ To find the section quickly: CTRL + F and search for "static void main" Jacobo Rodr=EDguez Villar Proyectos en desarrollo: http://www.typhoonlabs.com tweety wrote: > Sorry if this is OT, and if it is, please redirect (IIS joke :) ) to=20 > the appropiate list. > =20 > I'm writing a managed dx9 app and, coming from the c++ world (and=20 > seeing the sdk samples), my main loop is: > =20 > MainForm form=3Dnew MainForm(); > engine.Init(form); > while(form.Created) > { > engine.Update(); > engine.Render(); > Application.DoEvents(); > } > engine.Dispose(); > =20 > But I read in some blog that DoEvents is bad because it allocates=20 > ~200bytes per call (kinda a lot), forcing the form class into gen1=20 > garbage collection. > Now I'm asking you: what's the best way to do it? > =20 > ---------------------------------- > Peace and love, > Tweety > mi...@sy... <mailto:mi...@sy...> -=20 > twe...@us... > <mailto:twe...@us...> > YahooID: tweety_04_01 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |