directx 9 frame rate

Started by
4 comments, last by Namethatnobodyelsetook 17 years, 9 months ago
Hi, I'm working with directx 9. In my application the max frame rate i'm getting is 60FPS (no drawing, just the simple loop in any resolution). I'm working with a P4 2.8Gz, GeForce4 64MB and 512Mb RAM. I think 60FPS is really really low, but i cant do anything to increase that frame rate. I thought it was because i was using the directx debug version, but i installed the retail version and everything is the same. I also update all graphic drivers. Is there anything i need to do to improve the frame rate? Also, sometimes my application runs at 48FPS and sometimes at 60FPS, and i really dont know why. Any help??
Advertisement
Monitor refresh rate, change your PresentationInterval in your D3DPRESENT_PARAMETERS to D3DPRESENT_INTERVAL_IMMEDIATE.

Note that this was answered in the FAQ and that you should ALWAYS read the FAQ first, it will save you and us time.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

Sorry!!! and thank you!!!

The frame rate increases to ~160

Sorry again, I already read the FAQ, very interesting BTW.
160 seems really low for an empty loop, unless you're in a *very* high resolution. Just clearing and presenting on a GeForce 3 on a 640x480 or 800x600 window I get close to 1000 FPS. While the frame rate is meaningless in such a simple app, yours is low enough that I have to wonder about your loop. Are you using blocking windows message calls (WaitMessage,GetMessage) or non blocking (PeekMessage)? For realtime apps, when you have focus, you should PeekMessage until it fails (ie: you're out of messages), then run your game loop, and go right back to PeekMessage again.
I'm using PeekMessage and a 1024x768x32 resolution, do you really think my frame rate is too low?
Try the sample browser, and pick "SimpleSample". I'm seeing 550 FPS on a GeForce3, P4 2.8. See what that gives you versus your empty app.

Your low framerate might be from however you're drawing your framerate counter, or it might just be your hardware, but 160 does sound really low to me.

This topic is closed to new replies.

Advertisement