Jump to content
  • Advertisement
Sign in to follow this  
rjackets

60 frames per second?

This topic is 4780 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 all. I have a (hopefully) quick question: I initially learned the DX API using C#, but then once I had the basics down I switched to C/C++. It was a rather simple switch and, personally, I find I perfer the freedom C/C++ gives me. However, in C# my fps counter gave me very high render rates (around 3000) when there was nothing being drawn. Obviously it went down substantially once I started drawing stuff. Nonetheless, with a simple low-poly scene I was still getting around 700-800fps. Now, however, in C++, I am running at a very consistent 60fps. I thought maybe this might be due to some sort of interaction with the refresh rate of my monitor. However, even when I switch the render call down to a basic loop it still gives the same. It is not linked with the WM_PAINT call or anything either. Thoughts?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Is it a Release or Debug build?

Share this post


Link to post
Share on other sites
you have v-sync enabled. when you render the scene your app will hang until the monitor is ready to display the next frame. if you change the refresh rate of your monitor to, say, 120hz (assuming it's not an LCD) then you'll get 120FPS. google around or search the site for info on how to disable vsync if you want to.

-me

Share this post


Link to post
Share on other sites
Check you present parameters for your device.

You probably have something like:

d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;

And You are wanting to have D3DPRESENT_INTERVAL_IMMEDIATE instead.

Not that the way you have it is a bad thing, because the default is updating with your refresh rate and preventing frame tearing.

Share this post


Link to post
Share on other sites
Ah! Perfect. Thanks for that. Running at a nice 500fps now. I think I will include an option to enable/disable v-sync.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!