Jump to content
  • Advertisement
Sign in to follow this  
Pseelo

SlimDX and frame per second rate. FPS seems to be low.

This topic is 3619 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'm using SlimDX for few days and generally I really admire the work you guys (I hope the authors will read the post) put into it. I'm developing a simple 2D project based on your library and the SampleFramework you included in the SDK. The project is not demanding - its scenes contain up to 20 text lines and some polygons - but I realised that the fps is really low as for that (about 60fps). At first I thought that I allowed to VSync and the fps is simply adjusted to my monitor refresh rate. I checked that and there is no trace of VSync in the code. Beside that I changed the monitor refreshing to 60Hz and back to 75Hz and the fps didn't move a bit. Unfortunately when I run the samples included in the SDK the fps is exactly the same as in my app. Even in the SampleTriangle demo. And no, my graphics card is not so slow - the samples from the newest DirectX SDK (C++, I know) are not only more complicated but dramatically faster (500fps and up for a textured mesh with light and shadows) Could anybody tell me what is wrong? Is it a SlimDX problem (which I don't want to believe) or just my lack of knowledge? There's not even any need to look at my code - I will be really happy and a lot wiser if anyone tell me what to do with the SampleTriangle to get 500fps :) By the way - is there any hope for a less laconic documentation in the future? [sorry, i should have mentioned that I use C#] Best regards. Chris. [Edited by - Pseelo on November 20, 2008 3:32:25 AM]

Share this post


Link to post
Share on other sites
Advertisement
Thank you kindly.
I think this solves my problem. I've got no chance to check it at once because I'm at work at the moment (and 64bit Windows I use here doesn't support SlimDX 64 for unknown reason) but I looked up the SlimDX docs and it seems that PresentInterval.Default waits for the vertical retrace period, so this might be the case.

I have additional question though. The cause why FPS rate worried me was that I wrote simple scene transition. I just use filled rectangle with alpha changing in time. Assuming I actually used VSync there should be no blinking while drawing this rectangle but for sure the drawing was not smooth. In other words - do PresentInterval.Default & backbuffer & VSync guarantee that [of course if the scene rendering time is shorter than vertical retrace period] there will be no blinking?

Best regards.
Chris.

Share this post


Link to post
Share on other sites
PresentInterval.Default will attempt to v-sync but uses a lower resolution timer than PresentInterval.One, which uses timeBeginPeriod to improve the v-sync. This is not to say that PresentInterval.Default doesn't provide a good v-sync (as it does) so any tearing or "blinking" are probably caused by something else in your code.

Regards,
ViLiO

Share this post


Link to post
Share on other sites
If you're using the Sample Framework, as many of our samples do, your frame rate will be locked to 60 FPS by default. You can get around this by setting the Game.IsFixedTimeStep property to false.

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!