Archived

This topic is now archived and is closed to further replies.

DirectX9 on DX8 native 3dcards

This topic is 4945 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I ve a little problem when using a managed dx9 application on 3dcards using native Dx8 or under ... The program takes 100% cpu core without any reason even if I don t draw anything on the device ... any idea ? -- Sinn

Share this post


Link to post
Share on other sites
If v-sync is off or the application is minimized, this might be the case on certain video cards (also in DirectX9... it''s just the standard behaviour of certain vendors). You can eliminate this effect by detecting a "too-high" frame rate (say above 200fps) (or even better, a too-low frame TIME) and sleeping for 1ms among other methods. If you''re in full screen and don''t minimize the app, you can simply enable v-sync in your app.

Share this post


Link to post
Share on other sites
Im thinking that your problem has nothing to do with DirectX9 or 8 for that matter. The problem is in your Windows forms code(assuming that by managed you mean .Net) and this realisticly isnt a problem. But anyway you are running in a tight loop that, even doing nothing but looping with do just that loop, now let me tell you it's looping prety fast when there is nothing to do inbetween but it is still looping, taking any processor power it can squeeze out of the CPU.

Every App that i know of does this, take a look at quake III even in the menu it uses 100% CPU. The one place I see using 100% CPU being a problem is in windowed mode because the user wants to do other things. But you can just fake it and check to see if the window has focus before taking control and running your tight loop.

If any of this makes no sence then send some one to slap me upside the head, or just point out the foggyness and i will attempt to clarify.

-Edit I forgot that posts dont look the same when you type them

[edited by - HippieHunter on May 31, 2004 12:07:28 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by SinnDarin
Hi, I ve a little problem when using a managed dx9 application on 3dcards using native Dx8 or under ... The program takes 100% cpu core without any reason even if I don t draw anything on the device ... any idea ?



You probably have a loop with Application.DoEvents() and your drawing code.
Try putting a call to System.Threading.Sleep(2) in there, that should ease the CPU load.

Share this post


Link to post
Share on other sites