Jump to content
  • Advertisement
Sign in to follow this  
nex7

[.net] low framerate on simple app

This topic is 4912 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

I posted this in the directx forum to no avail...so ill try here I've created a class in C# that inherits System.Windows.Forms.Panel for displaying my d3d stuff...so I can just drop my 3d renderer on any old form. Now I am seeing really low framerates ~20 even though it does virtually nothing. The cpu usage is at 1% and it just isnt doing its job. am i missing a setting? i started with the vertices tutorial provided by the directx sample browser.. both of the triangle samples have ~20ish fps..where the animation sample is running close to 500 fps. The only thing i see different is that the animation one is using the sample framework deal. Does it speed things up? then i snatched up all of the direct 3d stuff and put it in a different file that inherited Panel...now i have the ability to drop this d3dpanel on any windows form... BUT...it seems really slow for no reason...i didnt really change anything except REMOVING stuff from the drawing app... also..if you take the default app from the sample...and add an fps counter to it...it will run slow as well...but the animation sample runs at a good 400 fps on my machine. i just dont get it...the animation sample is much more complicated.. thanks

Share this post


Link to post
Share on other sites
Advertisement
SO

i have set the PresentInterval to Imediate....even tho windowed is supposed to be default only..

this sped it up to about 280 fps...

so i guess that was it...never mind :)

Share this post


Link to post
Share on other sites
One thing I have found with windowed DX apps is that if I don't overwrite the OnPaint and OnPaintBackground methods of my render target control to do nothing I get bad performance, flashing and strange errors.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!