Sign in to follow this  
rjackets

60 frames per second?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this