RE: .NET main loop

"tweety" <[email protected]>
Newsgroups gmane.games.devel.windows
Message-ID <20040219021606.BCCS15552.tomts13-srv.bellnexxia.net@xp2500>
Thanks. I've been looking for the idle event for some time now :)

----------------------------------
Peace and love,
Tweety
[email protected] - [email protected]
YahooID: tweety_04_01

 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Jacobo Rodriguez
Sent: February 18, 2004 2:23 AM
To: [email protected]
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íguez Villar

Proyectos en desarrollo:

http://www.typhoonlabs.com



tweety wrote:

> Sorry if this is OT, and if it is, please redirect (IIS joke :) ) to 
> the appropiate list.
>  
> I'm writing a managed dx9 app and, coming from the c++ world (and 
> seeing the sdk samples), my main loop is:
>  
> MainForm form=new MainForm();
> engine.Init(form);
> while(form.Created)
> {
>   engine.Update();
>   engine.Render();
>   Application.DoEvents();
> }
> engine.Dispose();
>  
> But I read in some blog that DoEvents is bad because it allocates 
> ~200bytes per call (kinda a lot), forcing the form class into gen1 
> garbage collection.
> Now I'm asking you: what's the best way to do it?
>  
> ----------------------------------
> Peace and love,
> Tweety
> [email protected] <mailto:[email protected]> - 
> [email protected]
> <mailto:[email protected]>
> 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_id56&alloc_id438&op=ick
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_idU5



-------------------------------------------------------
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_id56&alloc_id438&op=click
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_idU5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.